@@ -1253,14 +1253,30 @@ func.func @test_pow_i32(%arg0: !torch.vtensor<[3,4,5],si32>, %arg1: !torch.vtens
1253
1253
// CHECK: %[[NONE:.+]] = torch.constant.none
1254
1254
// CHECK: %[[POW:.+]] = torch.aten.pow.Tensor_Tensor %arg0, %arg1 : !torch.vtensor<[3,4,5],si32>, !torch.vtensor<[3,4,5],si32> -> !torch.vtensor<[3,4,5],f64>
1255
1255
// CHECK: %[[DTY:.+]] = torch.constant.int 3
1256
- // CHECK: %[[RES:.+]] = torch.aten.to.dtype %[[POW]], %[[DTY]], %[[FALSE]], %[[FALSE]], %[[NONE]]
1256
+ // CHECK: %[[ROUND:.+]] = torch.aten.round %[[POW]] : !torch.vtensor<[3,4,5],f64> -> !torch.vtensor<[3,4,5],f64>
1257
+ // CHECK: %[[RES:.+]] = torch.aten.to.dtype %[[ROUND]], %[[DTY]], %[[FALSE]], %[[FALSE]], %[[NONE]]
1257
1258
// CHECK: return %[[RES]]
1258
1259
%0 = torch.operator " onnx.Pow" (%arg0 , %arg1 ) : (!torch.vtensor <[3 ,4 ,5 ],si32 >, !torch.vtensor <[3 ,4 ,5 ],si32 >) -> !torch.vtensor <[3 ,4 ,5 ],si32 >
1259
1260
return %0 : !torch.vtensor <[3 ,4 ,5 ],si32 >
1260
1261
}
1261
1262
1262
1263
// -----
1263
1264
1265
+ // CHECK-LABEL: func.func @test_pow_i32_f32_to_i32
1266
+ func.func @test_pow_i32_f32_to_i32 (%arg0: !torch.vtensor <[3 ,4 ,5 ],si32 >, %arg1: !torch.vtensor <[3 ,4 ,5 ],f32 >) -> !torch.vtensor <[3 ,4 ,5 ],si32 > attributes {torch.onnx_meta.ir_version = 8 : si64 , torch.onnx_meta.opset_version = 15 : si64 , torch.onnx_meta.producer_name = " backend-test" , torch.onnx_meta.producer_version = " " } {
1267
+ // CHECK: %[[FALSE:.+]] = torch.constant.bool false
1268
+ // CHECK: %[[NONE:.+]] = torch.constant.none
1269
+ // CHECK: %[[POW:.+]] = torch.aten.pow.Tensor_Tensor %arg0, %arg1 : !torch.vtensor<[3,4,5],si32>, !torch.vtensor<[3,4,5],f32> -> !torch.vtensor<[3,4,5],f64>
1270
+ // CHECK: %[[DTY:.+]] = torch.constant.int 3
1271
+ // CHECK: %[[ROUND:.+]] = torch.aten.round %[[POW]] : !torch.vtensor<[3,4,5],f64> -> !torch.vtensor<[3,4,5],f64>
1272
+ // CHECK: %[[RES:.+]] = torch.aten.to.dtype %[[ROUND]], %[[DTY]], %[[FALSE]], %[[FALSE]], %[[NONE]]
1273
+ // CHECK: return %[[RES]]
1274
+ %0 = torch.operator " onnx.Pow" (%arg0 , %arg1 ) : (!torch.vtensor <[3 ,4 ,5 ],si32 >, !torch.vtensor <[3 ,4 ,5 ],f32 >) -> !torch.vtensor <[3 ,4 ,5 ],si32 >
1275
+ return %0 : !torch.vtensor <[3 ,4 ,5 ],si32 >
1276
+ }
1277
+
1278
+ // -----
1279
+
1264
1280
// CHECK-LABEL: @test_hardsigmoid_example
1265
1281
func.func @test_hardsigmoid_example (%arg0: !torch.vtensor <[3 ],f32 >) -> !torch.vtensor <[3 ],f32 > attributes {torch.onnx_meta.ir_version = 3 : si64 , torch.onnx_meta.opset_version = 6 : si64 , torch.onnx_meta.producer_name = " backend-test" , torch.onnx_meta.producer_version = " " } {
1266
1282
// CHECK: %[[ALPHA_FLOAT:.*]] = torch.constant.float 5.000000e-01
0 commit comments