From 7dda698e7e0023d22bd8a16acefe43ad482e79cd Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 22 Jan 2020 16:40:33 -0500 Subject: [PATCH] Add test with dilations and auto padding set to SAME_UPPER. --- test/mlir/onnx/onnx_shape_inference.mlir | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/mlir/onnx/onnx_shape_inference.mlir b/test/mlir/onnx/onnx_shape_inference.mlir index 9022b05..656866e 100644 --- a/test/mlir/onnx/onnx_shape_inference.mlir +++ b/test/mlir/onnx/onnx_shape_inference.mlir @@ -138,3 +138,14 @@ func @test_conv_no_bias_10(%arg0 : tensor<1x2x32x64xf32>, %arg1 : tensor<5x2x6x7 // CHECK-LABEL: test_conv_no_bias_10 // CHECK: [[RES_ATTR:%.+]] = "onnx.ConvNoBias"(%arg0, %arg1) {auto_pad = "NOTSET", dilations = [2, 3], group = 1 : i32, strides = [2, 2]} : (tensor<1x2x32x64xf32>, tensor<5x2x6x7xf32>) -> tensor<1x5x10x21xf32> // CHECK: return [[RES_ATTR]] : tensor<1x5x10x21xf32> + +/// dilations attribute with auto_pad set to SAME_UPPER. + +func @test_conv_no_bias_11(%arg0 : tensor<1x2x32x64xf32>, %arg1 : tensor<5x2x6x7xf32>) -> tensor<*xf32> { + %0 = "onnx.ConvNoBias"(%arg0, %arg1) {auto_pad = "SAME_UPPER", group = 1 : i32, dilations = [2, 3]} : (tensor<1x2x32x64xf32>, tensor<5x2x6x7xf32>) -> tensor<*xf32> + "std.return"(%0) : (tensor<*xf32>) -> () +} + +// CHECK-LABEL: test_conv_no_bias_11 +// CHECK: [[RES_ATTR:%.+]] = "onnx.ConvNoBias"(%arg0, %arg1) {auto_pad = "SAME_UPPER", dilations = [2, 3], group = 1 : i32} : (tensor<1x2x32x64xf32>, tensor<5x2x6x7xf32>) -> tensor<1x5x32x64xf32> +// CHECK: return [[RES_ATTR]] : tensor<1x5x32x64xf32>