10
10
// CHECK: %[[VAL_5:.*]] = torch_c.to_i64 %[[VAL_4]]
11
11
// CHECK: %[[VAL_6:.*]] = arith.constant 0 : i64
12
12
// CHECK: %[[VAL_7:.*]] = arith.constant 9223372036854775807 : i64
13
- // CHECK: %[[VAL_8:.*]] = arith.cmpi ule , %[[VAL_6]], %[[VAL_5]] : i64
14
- // CHECK: %[[VAL_9:.*]] = arith.cmpi ule , %[[VAL_5]], %[[VAL_7]] : i64
13
+ // CHECK: %[[VAL_8:.*]] = arith.cmpi sle , %[[VAL_6]], %[[VAL_5]] : i64
14
+ // CHECK: %[[VAL_9:.*]] = arith.cmpi sle , %[[VAL_5]], %[[VAL_7]] : i64
15
15
// CHECK: %[[VAL_10:.*]] = arith.andi %[[VAL_8]], %[[VAL_9]] : i1
16
16
// CHECK: cf.assert %[[VAL_10]], "Invalid value range for size between [0, 9223372036854775807]"
17
17
// CHECK: %[[VAL_11:.*]] = arith.constant 0 : i64
18
18
// CHECK: %[[VAL_12:.*]] = arith.constant 7 : i64
19
- // CHECK: %[[VAL_13:.*]] = arith.cmpi ule , %[[VAL_11]], %[[VAL_5]] : i64
20
- // CHECK: %[[VAL_14:.*]] = arith.cmpi ule , %[[VAL_5]], %[[VAL_12]] : i64
19
+ // CHECK: %[[VAL_13:.*]] = arith.cmpi sle , %[[VAL_11]], %[[VAL_5]] : i64
20
+ // CHECK: %[[VAL_14:.*]] = arith.cmpi sle , %[[VAL_5]], %[[VAL_12]] : i64
21
21
// CHECK: %[[VAL_15:.*]] = arith.andi %[[VAL_13]], %[[VAL_14]] : i1
22
22
// CHECK: cf.assert %[[VAL_15]], "Invalid value range for size between [0, 7]"
23
23
// CHECK: return %[[VAL_4]] : !torch.int
24
24
25
- module {
26
- func.func @torch.aten.sym_constrain_range (%arg0: !torch.vtensor <[],si64 >) -> !torch.int {
25
+ func.func @torch.aten.sym_constrain_range (%arg0: !torch.vtensor <[],si64 >) -> !torch.int {
27
26
%int7 = torch.constant.int 7
28
27
%int0 = torch.constant.int 0
29
28
%none = torch.constant.none
30
29
%0 = torch.aten.item %arg0 : !torch.vtensor <[],si64 > -> !torch.int
31
30
torch.aten.sym_constrain_range %0 , %int0 , %none : !torch.int , !torch.int , !torch.none
32
31
torch.aten.sym_constrain_range %0 , %int0 , %int7 : !torch.int , !torch.int , !torch.int
33
32
return %0 : !torch.int
34
- }
35
33
}
36
34
37
35
// -----
@@ -47,8 +45,8 @@ module {
47
45
// CHECK: %[[VAL_7:.*]] = torch_c.to_i64 %[[VAL_6]]
48
46
// CHECK: %[[VAL_8:.*]] = arith.constant 0 : i64
49
47
// CHECK: %[[VAL_9:.*]] = arith.constant 9223372036854775807 : i64
50
- // CHECK: %[[VAL_10:.*]] = arith.cmpi ule , %[[VAL_8]], %[[VAL_7]] : i64
51
- // CHECK: %[[VAL_11:.*]] = arith.cmpi ule , %[[VAL_7]], %[[VAL_9]] : i64
48
+ // CHECK: %[[VAL_10:.*]] = arith.cmpi sle , %[[VAL_8]], %[[VAL_7]] : i64
49
+ // CHECK: %[[VAL_11:.*]] = arith.cmpi sle , %[[VAL_7]], %[[VAL_9]] : i64
52
50
// CHECK: %[[VAL_12:.*]] = arith.andi %[[VAL_10]], %[[VAL_11]] : i1
53
51
// CHECK: cf.assert %[[VAL_12]], "Invalid value range for size between [0, 9223372036854775807]"
54
52
// CHECK: %[[VAL_13:.*]] = torch.aten.ge.int %[[VAL_6]], %[[VAL_4]] : !torch.int, !torch.int -> !torch.bool
0 commit comments