@@ -1217,6 +1217,37 @@ func.func @test_convinteger_without_padding(%arg0: !torch.vtensor<[1,1,3,3],ui8>
12171217
12181218// -----
12191219
1220+ // CHECK-LABEL: @test_convinteger_with_valid_autopad
1221+ func.func @test_convinteger_with_valid_autopad (%arg0: !torch.vtensor <[1 ,1 ,3 ,3 ],ui8 >, %arg1: !torch.vtensor <[1 ,1 ,2 ,2 ],ui8 >, %arg2: !torch.vtensor <[],ui8 >, %arg3: !torch.vtensor <[1 ],ui8 >) -> !torch.vtensor <[1 ,1 ,2 ,2 ],si32 > attributes {torch.onnx_meta.ir_version = 5 : si64 , torch.onnx_meta.opset_version = 17 : si64 , torch.onnx_meta.producer_name = " backend-test" , torch.onnx_meta.producer_version = " " } {
1222+ // CHECK: %[[NONE:.*]] = torch.constant.none
1223+ // CHECK: %[[SCALE:.*]] = torch.constant.float 1.000000e+00
1224+ // CHECK: %[[INPUT_ZP:.*]] = torch.aten.item %arg2 : !torch.vtensor<[],ui8> -> !torch.int
1225+ // CHECK: %[[WEIGHT_ZP:.*]] = torch.aten.item %arg3 : !torch.vtensor<[1],ui8> -> !torch.int
1226+ // CHECK: %[[C0:.*]] = torch.constant.int 0
1227+ // CHECK: %[[C0_0:.*]] = torch.constant.int 0
1228+ // CHECK: %[[PADDING:.*]] = torch.prim.ListConstruct %[[C0]], %[[C0_0]] : (!torch.int, !torch.int) -> !torch.list<int>
1229+ // CHECK: %[[C1_0:.*]] = torch.constant.int 1
1230+ // CHECK: %[[C1_1:.*]] = torch.constant.int 1
1231+ // CHECK: %[[DILATIONS:.*]] = torch.prim.ListConstruct %[[C1_0]], %[[C1_1]] : (!torch.int, !torch.int) -> !torch.list<int>
1232+ // CHECK: %[[C1_2:.*]] = torch.constant.int 1
1233+ // CHECK: %[[C1_3:.*]] = torch.constant.int 1
1234+ // CHECK: %[[STRIDE:.*]] = torch.prim.ListConstruct %[[C1_2]], %[[C1_3]] : (!torch.int, !torch.int) -> !torch.list<int>
1235+ // CHECK: %[[C0_1:.*]] = torch.constant.int 0
1236+ // CHECK: %[[C0_2:.*]] = torch.constant.int 0
1237+ // CHECK: %[[OUTPUT_PADDING:.*]] = torch.prim.ListConstruct %[[C0_1]], %[[C0_2]] : (!torch.int, !torch.int) -> !torch.list<int>
1238+ // CHECK: %[[TRANSPOSED:.*]] = torch.constant.bool false
1239+ // CHECK: %[[BIAS:.*]] = torch.constant.none
1240+ // CHECK: %[[GROUPS:.*]] = torch.constant.int 1
1241+ // CHECK: %[[INPUT:.*]] = torch.aten._make_per_tensor_quantized_tensor %arg0, %[[SCALE]], %[[INPUT_ZP]] : !torch.vtensor<[1,1,3,3],ui8>, !torch.float, !torch.int -> !torch.vtensor<[1,1,3,3],!torch.quint8>
1242+ // CHECK: %[[WEIGHT:.*]] = torch.aten._make_per_tensor_quantized_tensor %arg1, %[[SCALE]], %[[WEIGHT_ZP]] : !torch.vtensor<[1,1,2,2],ui8>, !torch.float, !torch.int -> !torch.vtensor<[1,1,2,2],!torch.quint8>
1243+ // CHECK: torch.aten.convolution %[[INPUT]], %[[WEIGHT]], %[[BIAS]], %[[STRIDE]], %[[PADDING]], %[[DILATIONS]], %[[TRANSPOSED]], %[[OUTPUT_PADDING]], %[[GROUPS]] : !torch.vtensor<[1,1,3,3],!torch.quint8>, !torch.vtensor<[1,1,2,2],!torch.quint8>, !torch.none, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool, !torch.list<int>, !torch.int -> !torch.vtensor<[1,1,2,2],si32>
1244+ %none = torch.constant.none
1245+ %0 = torch.operator " onnx.ConvInteger" (%arg0 , %arg1 , %arg2 , %arg3 ) {torch.onnx.auto_pad = " VALID" } : (!torch.vtensor <[1 ,1 ,3 ,3 ],ui8 >, !torch.vtensor <[1 ,1 ,2 ,2 ],ui8 >, !torch.vtensor <[],ui8 >, !torch.vtensor <[1 ],ui8 >) -> !torch.vtensor <[1 ,1 ,2 ,2 ],si32 >
1246+ return %0 : !torch.vtensor <[1 ,1 ,2 ,2 ],si32 >
1247+ }
1248+
1249+ // -----
1250+
12201251// CHECK-LABEL: @test_convinteger_with_padding
12211252func.func @test_convinteger_with_padding (%arg0: !torch.vtensor <[1 ,1 ,3 ,3 ],ui8 >, %arg1: !torch.vtensor <[1 ,1 ,2 ,2 ],ui8 >, %arg2: !torch.vtensor <[],ui8 >) -> !torch.vtensor <[1 ,1 ,4 ,4 ],si32 > attributes {torch.onnx_meta.ir_version = 5 : si64 , torch.onnx_meta.opset_version = 17 : si64 , torch.onnx_meta.producer_name = " backend-test" , torch.onnx_meta.producer_version = " " } {
12221253 // CHECK: %[[NONE:.*]] = torch.constant.none
0 commit comments