Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tf-frontend] Replace where to non zero #386

Merged
merged 6 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,13 @@ inline void registerAllMhloInferReturnTypeComponents() {
//===----------------------------------------------------------------------===//
void registerDynamicPartitionInferBoundedReturnTypeComponents();
void registerNonZeroInferBoundedReturnTypeComponents();
void registerWhereInferBoundedReturnTypeComponents();
void registerScatterNdInferBoundedReturnTypeComponents();
void registerStridedSliceInferBoundedReturnTypeComponents();
void registerRepeatInferBoundedReturnTypeComponents();

inline void registerAllMhloInferBoundedReturnTypeComponents() {
registerDynamicPartitionInferBoundedReturnTypeComponents();
registerNonZeroInferBoundedReturnTypeComponents();
registerWhereInferBoundedReturnTypeComponents();
registerScatterNdInferBoundedReturnTypeComponents();
registerStridedSliceInferBoundedReturnTypeComponents();
registerRepeatInferBoundedReturnTypeComponents();
Expand Down
1 change: 0 additions & 1 deletion compiler/include/byteir/Dialect/mhlo/Util/CustomCallUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ constexpr llvm::StringRef getDynamicMaskStitchName() {
return TF_NAME_PREFIX "DynamicMaskStitch";
}

constexpr llvm::StringRef getWhereName() { return TF_NAME_PREFIX "Where"; }
constexpr llvm::StringRef getScatterNdName() {
return TF_NAME_PREFIX "ScatterNd";
}
Expand Down
1 change: 0 additions & 1 deletion compiler/lib/Dialect/mhlo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ add_mlir_dialect_library(ByteIRMhloDynamicShapeOpRegister
DynamicShapeOpRegister/Softmax.cpp
DynamicShapeOpRegister/AddN.cpp
DynamicShapeOpRegister/TorchIndexSelect.cpp
DynamicShapeOpRegister/Where.cpp
DynamicShapeOpRegister/ScatterNd.cpp
DynamicShapeOpRegister/StridedSlice.cpp
DynamicShapeOpRegister/BatchMatMul.cpp
Expand Down
7 changes: 4 additions & 3 deletions compiler/lib/Dialect/mhlo/DynamicShapeOpRegister/NonZero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ void mlir::registerNonZeroInferBoundedReturnTypeComponents() {
if (!inputShape || !inputShape.hasStaticShape())
return failure();

Type type = RankedTensorType::get({inputShape.getNumElements()},
IntegerType::get(context, 64));
Type type = RankedTensorType::get(
{inputShape.getNumElements(), inputShape.getRank()},
IntegerType::get(context, 64));
inferredReturnTypes.push_back(cast<ShapedType>(type));
return success();
});
}
}
45 changes: 0 additions & 45 deletions compiler/lib/Dialect/mhlo/DynamicShapeOpRegister/Where.cpp

This file was deleted.

20 changes: 6 additions & 14 deletions compiler/test/Transforms/boundedShapeInference.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,13 @@ func.func @several_ops(%arg0: tensor<?x4xf32> {byteir.bounded_shape = [8, 4]}, %
//CHECK-NEXT: %3 = mhlo.add %0, %2 : tensor<?x4xf32, {byteir.bounded_shape = [8, 4]}>
//CHECK-NEXT: return %3 : tensor<?x4xf32, {byteir.bounded_shape = [8, 4]}>

func.func @registered_shape_infer(%arg0 : tensor<?x4xf32> {byteir.bounded_shape = [8, 4]}) -> tensor<?xi64> {
%0 = "mhlo.custom_call"(%arg0) {call_target_name = "byteir.non_zero"} : (tensor<?x4xf32>) -> tensor<?xi64>
return %0 : tensor<?xi64>
func.func @registered_shape_infer(%arg0 : tensor<?x4xf32> {byteir.bounded_shape = [8, 4]}) -> tensor<?x2xi64> {
%0 = "mhlo.custom_call"(%arg0) {call_target_name = "byteir.non_zero"} : (tensor<?x4xf32>) -> tensor<?x2xi64>
return %0 : tensor<?x2xi64>
}
//CHECK-LABEL: func.func @registered_shape_infer(%arg0: tensor<?x4xf32, {byteir.bounded_shape = [8, 4]}> {byteir.bounded_shape = [8, 4]}) -> tensor<?xi64, {byteir.bounded_shape = [32]}> {
//CHECK-NEXT: %0 = mhlo.custom_call @byteir.non_zero(%arg0) : (tensor<?x4xf32, {byteir.bounded_shape = [8, 4]}>) -> tensor<?xi64, {byteir.bounded_shape = [32]}>
//CHECK-NEXT: return %0 : tensor<?xi64, {byteir.bounded_shape = [32]}>

func.func @tf_where(%arg0 : tensor<1xi1>) -> tensor<?x1xi64> {
%0 = "mhlo.custom_call"(%arg0) { call_target_name = "tf.Where" } : (tensor<1xi1>) -> tensor<?x1xi64>
return %0 : tensor<?x1xi64>
}
//CHECK-LABEL: func.func @tf_where(%arg0: tensor<1xi1>) -> tensor<?x1xi64, {byteir.bounded_shape = [1, 1]}> {
//CHECK-NEXT: %0 = mhlo.custom_call @tf.Where(%arg0) : (tensor<1xi1>) -> tensor<?x1xi64, {byteir.bounded_shape = [1, 1]}>
//CHECK-NEXT: return %0 : tensor<?x1xi64, {byteir.bounded_shape = [1, 1]}>
//CHECK-LABEL: func.func @registered_shape_infer(%arg0: tensor<?x4xf32, {byteir.bounded_shape = [8, 4]}> {byteir.bounded_shape = [8, 4]}) -> tensor<?x2xi64, {byteir.bounded_shape = [32, 2]}> {
//CHECK-NEXT: %0 = mhlo.custom_call @byteir.non_zero(%arg0) : (tensor<?x4xf32, {byteir.bounded_shape = [8, 4]}>) -> tensor<?x2xi64, {byteir.bounded_shape = [32, 2]}>
//CHECK-NEXT: return %0 : tensor<?x2xi64, {byteir.bounded_shape = [32, 2]}>

func.func @main_sub_0(%arg0: tensor<?x4xf32> {byteir.bounded_shape = [4, 4]}) -> tensor<?xf32> {
%0 = mhlo.constant dense<-0.000000e+00> : tensor<f32>
Expand Down
62 changes: 62 additions & 0 deletions frontends/tf-frontend/tf_mlir_ext/tests/fuse_tf_ops.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,65 @@ func.func @replace_where_3D(%arg0: tensor<256x1xi64>, %arg1: tensor<256x24x8xf16
// CHECK-NEXT: %15 = "tf.Mul"(%13, %14) : (tensor<?x24x8xf16>, tensor<?x24x1xf16>) -> tensor<?x24x8xf16>
// CHECK-NEXT: %16 = "tf.Sum"(%15, %cst_1) <{keep_dims = false}> : (tensor<?x24x8xf16>, tensor<1xi64>) -> tensor<?x8xf16>
// CHECK-NEXT: return %16 : tensor<?x8xf16>

func.func @replace_where_V2_2D(%arg0: tensor<256x1xi64>, %arg1: tensor<256x24xf16>) -> tensor<?xf16> {
%cst = "tf.Const"() <{value = dense<28800> : tensor<i64>}> : () -> tensor<i64>
%cst_1 = "tf.Const"() <{value = dense<86400> : tensor<i64>}> : () -> tensor<i64>
%cst_2 = "tf.Const"() <{value = dense<1.156330e-05> : tensor<f32>}> : () -> tensor<f32>
%cst_3 = "tf.Const"() <{value = dense<1.000000e+00> : tensor<f16>}> : () -> tensor<f16>
%cst_4 = "tf.Const"() <{value = dense<2.400000e+01> : tensor<f16>}> : () -> tensor<f16>
%cst_5 = "tf.Const"() <{value = dense<24> : tensor<i32>}> : () -> tensor<i32>
%cst_6 = "tf.Const"() <{value = dense<0.000000e+00> : tensor<f16>}> : () -> tensor<f16>
%cst_7 = "tf.Const"() <{value = dense<-1> : tensor<1xi32>}> : () -> tensor<1xi32>
%cst_8 = "tf.Const"() <{value = dense<6144> : tensor<1xi32>}> : () -> tensor<1xi32>
%cst_9 = "tf.Const"() <{value = dense<[6144, 8]> : tensor<2xi32>}> : () -> tensor<2xi32>
%cst_10 = "tf.Const"() <{value = dense<0> : tensor<i32>}> : () -> tensor<i32>
%0 = "tf.AddV2"(%arg0, %cst) {device = ""} : (tensor<256x1xi64>, tensor<i64>) -> tensor<256x1xi64>
%1 = "tf.FloorMod"(%0, %cst_1) {device = ""} : (tensor<256x1xi64>, tensor<i64>) -> tensor<256x1xi64>
%2 = "tf.Cast"(%1) <{Truncate = false}> {device = ""} : (tensor<256x1xi64>) -> tensor<256x1xf16>
%3 = "tf.Cast"(%2) <{Truncate = false}> {device = ""} : (tensor<256x1xf16>) -> tensor<256x1xf32>
%4 = "tf.Mul"(%3, %cst_2) {device = ""} : (tensor<256x1xf32>, tensor<f32>) -> tensor<256x1xf32>
%5 = "tf.Cast"(%4) <{Truncate = false}> {device = ""} : (tensor<256x1xf32>) -> tensor<256x1xf16>
%6 = "tf.FloorMod"(%5, %cst_3) {device = ""} : (tensor<256x1xf16>, tensor<f16>) -> tensor<256x1xf16>
%7 = "tf.Mul"(%6, %cst_4) {device = ""} : (tensor<256x1xf16>, tensor<f16>) -> tensor<256x1xf16>
%8 = "tf.Cast"(%7) <{Truncate = false}> {device = ""} : (tensor<256x1xf16>) -> tensor<256x1xi64>
%9 = "tf.Squeeze"(%8) <{squeeze_dims = [1]}> {device = ""} : (tensor<256x1xi64>) -> tensor<256xi64>
%10 = "tf.OneHot"(%9, %cst_5, %cst_3, %cst_6) <{axis = -1 : i64}> {device = ""} : (tensor<256xi64>, tensor<i32>, tensor<f16>, tensor<f16>) -> tensor<256x24xf16>
%11 = "tf.Reshape"(%10, %cst_7) {device = ""} : (tensor<256x24xf16>, tensor<1xi32>) -> tensor<6144xf16>
%12 = "tf.Cast"(%11) <{Truncate = false}> {device = ""} : (tensor<6144xf16>) -> tensor<6144xf32>
%13 = "tf.Where"(%12) {device = ""} : (tensor<6144xf32>) -> tensor<?x1xi64>
%14 = "tf.Squeeze"(%13) <{squeeze_dims = [1]}> {device = ""} : (tensor<?x1xi64>) -> tensor<?xi64>
%15 = "tf.Reshape"(%arg1, %cst_8) {device = ""} : (tensor<256x24xf16>, tensor<1xi32>) -> tensor<6144xf16>
%16 = "tf.GatherV2"(%15, %14, %cst_10) <{batch_dims = 0 : i64}> {device = ""} : (tensor<6144xf16>, tensor<?xi64>, tensor<i32>) -> tensor<?xf16>
return %16 : tensor<?xf16>
}
// CHECK-LABEL: func.func @replace_where_V2_2D(%arg0: tensor<256x1xi64>, %arg1: tensor<256x24xf16>) -> tensor<?xf16> {
// CHECK-NEXT: %cst = "tf.Const"() <{value = dense<0> : tensor<1xi64>}> : () -> tensor<1xi64>
// CHECK-NEXT: %cst_0 = "tf.Const"() <{value = dense<1> : tensor<1xi64>}> : () -> tensor<1xi64>
// CHECK-NEXT: %cst_1 = "tf.Const"() <{value = dense<28800> : tensor<i64>}> : () -> tensor<i64>
// CHECK-NEXT: %cst_2 = "tf.Const"() <{value = dense<86400> : tensor<i64>}> : () -> tensor<i64>
// CHECK-NEXT: %cst_3 = "tf.Const"() <{value = dense<1.156330e-05> : tensor<f32>}> : () -> tensor<f32>
// CHECK-NEXT: %cst_4 = "tf.Const"() <{value = dense<1.000000e+00> : tensor<f16>}> : () -> tensor<f16>
// CHECK-NEXT: %cst_5 = "tf.Const"() <{value = dense<2.400000e+01> : tensor<f16>}> : () -> tensor<f16>
// CHECK-NEXT: %cst_6 = "tf.Const"() <{value = dense<24> : tensor<i32>}> : () -> tensor<i32>
// CHECK-NEXT: %cst_7 = "tf.Const"() <{value = dense<0.000000e+00> : tensor<f16>}> : () -> tensor<f16>
// CHECK-NEXT: %cst_8 = "tf.Const"() <{value = dense<0> : tensor<i32>}> : () -> tensor<i32>
// CHECK-NEXT: %0 = "tf.AddV2"(%arg0, %cst_1) {device = ""} : (tensor<256x1xi64>, tensor<i64>) -> tensor<256x1xi64>
// CHECK-NEXT: %1 = "tf.FloorMod"(%0, %cst_2) {device = ""} : (tensor<256x1xi64>, tensor<i64>) -> tensor<256x1xi64>
// CHECK-NEXT: %2 = "tf.Cast"(%1) <{Truncate = false}> {device = ""} : (tensor<256x1xi64>) -> tensor<256x1xf16>
// CHECK-NEXT: %3 = "tf.Cast"(%2) <{Truncate = false}> {device = ""} : (tensor<256x1xf16>) -> tensor<256x1xf32>
// CHECK-NEXT: %4 = "tf.Mul"(%3, %cst_3) {device = ""} : (tensor<256x1xf32>, tensor<f32>) -> tensor<256x1xf32>
// CHECK-NEXT: %5 = "tf.Cast"(%4) <{Truncate = false}> {device = ""} : (tensor<256x1xf32>) -> tensor<256x1xf16>
// CHECK-NEXT: %6 = "tf.FloorMod"(%5, %cst_4) {device = ""} : (tensor<256x1xf16>, tensor<f16>) -> tensor<256x1xf16>
// CHECK-NEXT: %7 = "tf.Mul"(%6, %cst_5) {device = ""} : (tensor<256x1xf16>, tensor<f16>) -> tensor<256x1xf16>
// CHECK-NEXT: %8 = "tf.Cast"(%7) <{Truncate = false}> {device = ""} : (tensor<256x1xf16>) -> tensor<256x1xi64>
// CHECK-NEXT: %9 = "tf.Squeeze"(%8) <{squeeze_dims = [1]}> {device = ""} : (tensor<256x1xi64>) -> tensor<256xi64>
// CHECK-NEXT: %10 = "tf.GreaterEqual"(%9, %cst) : (tensor<256xi64>, tensor<1xi64>) -> tensor<256xi1>
// CHECK-NEXT: %11 = "tf.Where"(%10) : (tensor<256xi1>) -> tensor<?x1xi64>
// CHECK-NEXT: %12 = "tf.Squeeze"(%11) <{squeeze_dims = [1]}> : (tensor<?x1xi64>) -> tensor<?xi64>
// CHECK-NEXT: %13 = "tf.GatherV2"(%9, %12, %cst_8) <{batch_dims = 0 : i64}> : (tensor<256xi64>, tensor<?xi64>, tensor<i32>) -> tensor<?xi64>
// CHECK-NEXT: %14 = "tf.OneHot"(%13, %cst_6, %cst_4, %cst_7) <{axis = -1 : i64}> : (tensor<?xi64>, tensor<i32>, tensor<f16>, tensor<f16>) -> tensor<?x24xf16>
// CHECK-NEXT: %15 = "tf.GatherV2"(%arg1, %12, %cst_8) <{batch_dims = 0 : i64}> : (tensor<256x24xf16>, tensor<?xi64>, tensor<i32>) -> tensor<?x24xf16>
// CHECK-NEXT: %16 = "tf.Mul"(%15, %14) : (tensor<?x24xf16>, tensor<?x24xf16>) -> tensor<?x24xf16>
// CHECK-NEXT: %17 = "tf.Sum"(%16, %cst_0) <{keep_dims = false}> : (tensor<?x24xf16>, tensor<1xi64>) -> tensor<?xf16>
// CHECK-NEXT: return %17 : tensor<?xf16>
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ func.func @addn_case0(%arg0: tensor<16x32xf32>, %arg1: tensor<16x32xf32>, %arg2:
// CHECK: mhlo.custom_call
// CHECK-SAME: @byteir.addn

func.func @where_case0(%arg0: tensor<6144xf32>) -> tensor<?x1xi64> {
%0 = "tf.Where"(%arg0) : (tensor<6144xf32>) -> tensor<?x1xi64>
return %0 : tensor<?x1xi64>
}
// CHECK-LABEL: func.func @where_case0
// CHECK: mhlo.custom_call
// CHECK-SAME: @byteir.non_zero

func.func @layer_norm(%arg0: tensor<1x32x3xf32>) -> tensor<1x32x3xf32> {
%cst = "tf.Const"() {value = dense<9.99999997E-7> : tensor<f32>} : () -> tensor<f32>
%cst_0 = "tf.Const"() {value = dense<[0.0401659757, -0.11370486, 0.432680517]> : tensor<3xf32>} : () -> tensor<3xf32>
Expand Down
2 changes: 2 additions & 0 deletions frontends/tf-frontend/tf_mlir_ext/transforms/fuse_tf_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,10 @@ struct FuseTFOpsPass : public FuseTFOpsBase<FuseTFOpsPass> {
patterns.add(std::make_unique<FuseSigmoid>(ctx));
if (replaceWhereToStatic) {
patterns.add(std::make_unique<ReplaceWhereStatic>(ctx));
patterns.add(std::make_unique<ReplaceWhereStaticV2>(ctx));
} else {
patterns.add(std::make_unique<ReplaceWhereDynamic>(ctx));
patterns.add(std::make_unique<ReplaceWhereDynamicV2>(ctx));
}

if (failed(applyPatternsAndFoldGreedily(funcOp, std::move(patterns)))) {
Expand Down
144 changes: 144 additions & 0 deletions frontends/tf-frontend/tf_mlir_ext/transforms/fuse_tf_ops.td
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,148 @@ def ReplaceWhereStatic : Pat<
(TwoRank $after_where), (OneRank $after_squeeze1),
(SameEleType $input1, $after_onehot)]>;

def ReplaceWhereDynamicV2 : Pat<
(TF_GatherV2Op
(TF_ReshapeOp:$after_reshape1
$input1,
$input_shape
),
(TF_SqueezeOp:$after_squeeze1
(TF_WhereOp:$after_where
(TF_CastOp:$after_cast2
(TF_ReshapeOp:$before_cast2
(TF_OneHotOp:$after_onehot
(TF_SqueezeOp:$after_squeeze
(TF_CastOp:$after_cast1
(TF_MulOp:$before_cast1
(TF_FloorModOp
(TF_CastOp
(TF_MulOp
(TF_CastOp
(TF_CastOp:$after_cast
(TF_FloorModOp:$before_cast
(TF_AddV2Op
$input,
(TF_ConstOp:$addconst $addconst_attr)
),
(TF_ConstOp:$floorconst $floorconst_attr)
),
$truncate
),
$truncate1
),
(TF_ConstOp:$mulconst $mulconst_attr)
),
$truncate2
),
(TF_ConstOp:$floorconst1 $floorconst1_attr)
),
(TF_ConstOp:$mulconst1 $mulconst1_attr)
),
$truncate3
),
$squeeze_dims
),
(TF_ConstOp:$depth $depth_attr),
(TF_ConstOp:$onvalue $onvalue_attr),
(TF_ConstOp:$offvalue $offvalue_attr),
$onehot_axis
),
(TF_ConstOp:$shape $shape_attr)
),
$truncate4
)
),
$squeeze_dims1
),
(TF_ConstOp:$gatheraxis $gatheraxis_attr),
$gather_batch_dims
),
(NativeCodeCall<"replaceWhereDynamic($_builder, $_loc, $0, $1, $2, $3, $4, $5, $6)"> $input1, $after_squeeze, $depth, $onvalue, $offvalue, $gatheraxis, $onehot_axis),
[(WhereValue2 $addconst_attr), (WhereValue3 $floorconst_attr),
(WhereValue0 $mulconst_attr), (FpSplatValueOne $floorconst1_attr),
(WhereValue4 $mulconst1_attr), (WhereValue1 $depth_attr),
(FpSplatValueOne $onvalue_attr), (FpSplatValueZero $offvalue_attr),
(IntSplatValueNegOne $shape_attr), (IntSplatValueZero $gatheraxis_attr),
(AxisAttrNegOne $onehot_axis), (AxisAttrZero $gather_batch_dims),
(IntegerEleType $before_cast), (FloatEleType $after_cast),
(FloatEleType $before_cast1), (IntegerEleType $after_cast1),
(FloatEleType $before_cast2), (FloatEleType $after_cast2),
(TwoRank $after_cast1), (OneRank $after_squeeze),
(TwoRank $after_onehot), (OneRank $before_cast2),
(TwoRank $after_where), (OneRank $after_squeeze1),
(SameEleType $input1, $after_onehot)]>;

def ReplaceWhereStaticV2 : Pat<
(TF_GatherV2Op
(TF_ReshapeOp:$after_reshape1
$input1,
$input_shape
),
(TF_SqueezeOp:$after_squeeze1
(TF_WhereOp:$after_where
(TF_CastOp:$after_cast2
(TF_ReshapeOp:$before_cast2
(TF_OneHotOp:$after_onehot
(TF_SqueezeOp:$after_squeeze
(TF_CastOp:$after_cast1
(TF_MulOp:$before_cast1
(TF_FloorModOp
(TF_CastOp
(TF_MulOp
(TF_CastOp
(TF_CastOp:$after_cast
(TF_FloorModOp:$before_cast
(TF_AddV2Op
$input,
(TF_ConstOp:$addconst $addconst_attr)
),
(TF_ConstOp:$floorconst $floorconst_attr)
),
$truncate
),
$truncate1
),
(TF_ConstOp:$mulconst $mulconst_attr)
),
$truncate2
),
(TF_ConstOp:$floorconst1 $floorconst1_attr)
),
(TF_ConstOp:$mulconst1 $mulconst1_attr)
),
$truncate3
),
$squeeze_dims
),
(TF_ConstOp:$depth $depth_attr),
(TF_ConstOp:$onvalue $onvalue_attr),
(TF_ConstOp:$offvalue $offvalue_attr),
$onehot_axis
),
(TF_ConstOp:$shape $shape_attr)
),
$truncate4
)
),
$squeeze_dims1
),
(TF_ConstOp:$gatheraxis $gatheraxis_attr),
$gather_batch_dims
),
(NativeCodeCall<"replaceWhereStatic($_builder, $_loc, $0, $1)"> $input1, $after_onehot),
[(WhereValue2 $addconst_attr), (WhereValue3 $floorconst_attr),
(WhereValue0 $mulconst_attr), (FpSplatValueOne $floorconst1_attr),
(WhereValue4 $mulconst1_attr), (WhereValue1 $depth_attr),
(FpSplatValueOne $onvalue_attr), (FpSplatValueZero $offvalue_attr),
(IntSplatValueNegOne $shape_attr), (IntSplatValueZero $gatheraxis_attr),
(AxisAttrNegOne $onehot_axis), (AxisAttrZero $gather_batch_dims),
(IntegerEleType $before_cast), (FloatEleType $after_cast),
(FloatEleType $before_cast1), (IntegerEleType $after_cast1),
(FloatEleType $before_cast2), (FloatEleType $after_cast2),
(TwoRank $after_cast1), (OneRank $after_squeeze),
(TwoRank $after_onehot), (OneRank $before_cast2),
(TwoRank $after_where), (OneRank $after_squeeze1),
(SameEleType $input1, $after_onehot)]>;

#endif // FUSE_TF_OPS_PATTERN
Loading
Loading