File tree Expand file tree Collapse file tree 5 files changed +16
-7
lines changed
test/mlir/conversion/onnx_to_krnl/Math Expand file tree Collapse file tree 5 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,15 @@ LogicalResult ONNXMeanVarianceNormalizationOp::inferShapes(
395
395
return inferShapeForUnaryOps (this ->getOperation ());
396
396
}
397
397
398
+ // ===----------------------------------------------------------------------===//
399
+ // MishOp
400
+ // ===----------------------------------------------------------------------===//
401
+
402
+ LogicalResult ONNXMishOp::inferShapes (
403
+ std::function<void (Region &)> doShapeInference) {
404
+ return inferShapeForUnaryOps (this ->getOperation ());
405
+ }
406
+
398
407
// ===----------------------------------------------------------------------===//
399
408
// NegOp
400
409
// ===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change @@ -382,6 +382,7 @@ using ONNXLogOpShapeHelper = ONNXUnaryOpShapeHelper;
382
382
using ONNXLogSoftmaxOpShapeHelper = ONNXUnaryOpShapeHelper;
383
383
using ONNXLpNormalizationOpShapeHelper = ONNXUnaryOpShapeHelper;
384
384
using ONNXMeanVarianceNormalizationOpShapeHelper = ONNXUnaryOpShapeHelper;
385
+ using ONNXMishOpShapeHelper = ONNXUnaryOpShapeHelper;
385
386
using ONNXNegOpShapeHelper = ONNXUnaryOpShapeHelper;
386
387
using ONNXNotOpShapeHelper = ONNXUnaryOpShapeHelper;
387
388
using ONNXRandomNormalLikeOpShapeHelper = ONNXUnaryOpShapeHelper;
Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ UNSUPPORTED_OPS(ONNXLpPoolOp)
47
47
UNSUPPORTED_OPS(ONNXMaxPoolOp)
48
48
UNSUPPORTED_OPS(ONNXMaxUnpoolOp)
49
49
UNSUPPORTED_OPS(ONNXMelWeightMatrixOp)
50
- UNSUPPORTED_OPS(ONNXMishOp)
51
50
UNSUPPORTED_OPS(ONNXMomentumOp)
52
51
UNSUPPORTED_OPS(ONNXMultinomialOp)
53
52
UNSUPPORTED_OPS(ONNXNegativeLogLikelihoodLossOp)
Original file line number Diff line number Diff line change @@ -1662,9 +1662,9 @@ func.func private @test_shrink(%arg0 : tensor<512xf32>) -> tensor<*xf32> {
1662
1662
1663
1663
// -----
1664
1664
1665
- func.func @test_mish (%arg0 : tensor <64 x128 xf32 >) -> tensor <64 x 128 x f32 > {
1666
- %0 = " onnx.Mish" (%arg0 ) : (tensor <64 x128 xf32 >) -> tensor <64 x 128 x f32 >
1667
- return %0 : tensor <64 x 128 x f32 >
1665
+ func.func @test_mish (%arg0 : tensor <64 x128 xf32 >) -> tensor <*x f32 > {
1666
+ %0 = " onnx.Mish" (%arg0 ) : (tensor <64 x128 xf32 >) -> tensor <*x f32 >
1667
+ " func. return" ( %0 ) : ( tensor <*x f32 >) -> ()
1668
1668
1669
1669
// CHECK-LABEL: func.func @test_mish
1670
1670
// CHECK-SAME: ([[PARAM_0_:%.+]]: memref<64x128xf32>) -> memref<64x128xf32> {
Original file line number Diff line number Diff line change @@ -2578,9 +2578,9 @@ func.func private @test_shrink(%arg0 : tensor<512xf32>) -> tensor<*xf32> {
2578
2578
2579
2579
// -----
2580
2580
2581
- func.func @test_mish (%arg0 : tensor <64 x128 xf32 >) -> tensor <64 x 128 x f32 > {
2582
- %0 = " onnx.Mish" (%arg0 ) : (tensor <64 x128 xf32 >) -> tensor <64 x 128 x f32 >
2583
- return %0 : tensor <64 x 128 x f32 >
2581
+ func.func @test_mish (%arg0 : tensor <64 x128 xf32 >) -> tensor <*x f32 > {
2582
+ %0 = " onnx.Mish" (%arg0 ) : (tensor <64 x128 xf32 >) -> tensor <*x f32 >
2583
+ " func. return" ( %0 ) : ( tensor <*x f32 >) -> ()
2584
2584
2585
2585
// CHECK-LABEL: func.func @test_mish
2586
2586
// CHECK-SAME: ([[PARAM_0_:%.+]]: memref<64x128xf32>) -> memref<64x128xf32> {
You can’t perform that action at this time.
0 commit comments