tensorflow/compiler/mlir/tensorflow/transforms/tpu_space_to_depth_pass.cc
// Creates transpose op for shape to depth transform.
Creates transpose op for shape to depth transform.
Creates transpose op for shape to depth transform .
TF::TransposeOp GetTransposeOpForConv2DFilter(OpBuilder* builder, Value input) {
  SmallVector<int32_t, 6> permutation = {0, 2, 1, 3, 4, 5};
  auto permute_type = RankedTensorType::get({6}, builder->getIntegerType(32));
  auto permute_attr = DenseIntElementsAttr::get(permute_type, permutation);
  auto permute_value =
      builder->create<TF::ConstOp>(input.getLoc(), permute_attr);
  return builder->create<TF::TransposeOp>(input.getLoc(), input, permute_value);
}
TF :: TransposeOp GetTransposeOpForConv2DFilter ( OpBuilder * builder , Value input ) { SmallVector < int32_t , 6 > permutation = { 0 , 2 , 1 , 3 , 4 , 5 } ; auto permute_type = RankedTensorType :: get ( { 6 } , builder -> getIntegerType ( 32 ) ) ; auto permute_attr = DenseIntElementsAttr :: get ( permute_type , permutation ) ; auto permute_value = builder -> create < TF :: ConstOp > ( input . getLoc ( ) , permute_attr ) ; return builder -> create < TF :: TransposeOp > ( input . getLoc ( ) , input , permute_value ) ; }
Creates transpose op for shape to depth transform.
Creates transpose op for shape to depth transform .