diff --git a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir index 3e654ab9c56b0..b94867a9f7e51 100644 --- a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir +++ b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir @@ -1410,3 +1410,25 @@ func.func @select_fp32(%arg0: tensor<1x1x5x5xi1>, %arg1: tensor<1x12x5x5xf32>, % return %0 : tensor<1x12x5x5xf32> } +// ----- + +// CHECK-LABEL: @test_custom_ops +func.func @test_custom_ops(%arg0: tensor<1xf32>, %arg1: tensor<1xf32>) -> () { + // CHECK: linalg.generic + // CHECK: math.atan2 + %2 = "tosa.custom"(%arg0, %arg1) <{config = "UNDEF", identifier = "atan2", implementation_attrs = "UNDEF"}> : (tensor<1xf32>, tensor<1xf32>) -> tensor<1xf32> + + return +} + + +// ----- + +// CHECK-LABEL: @test_custom_ops_dyn +func.func @test_custom_ops_dyn(%arg0: tensor, %arg1: tensor) -> () { + // CHECK: linalg.generic + // CHECK: math.atan2 + %2 = "tosa.custom"(%arg0, %arg1) <{config = "UNDEF", identifier = "atan2", implementation_attrs = "UNDEF"}> : (tensor, tensor) -> tensor + + return +} \ No newline at end of file