Skip to content

Commit 67ea9b5

Browse files
authored
Bump LLVM to 0913547d0e3939cc420e88ecd037240f33736820 (#2883)
Signed-off-by: Chenhui Huang <[email protected]>
1 parent faf79bd commit 67ea9b5

File tree

11 files changed

+87
-87
lines changed

11 files changed

+87
-87
lines changed

docs/BuildOnLinuxOSX.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Firstly, install MLIR (as a part of LLVM-Project):
1515
``` bash
1616
git clone -n https://github.com/llvm/llvm-project.git
1717
# Check out a specific branch that is known to work with ONNX-MLIR.
18-
cd llvm-project && git checkout 6461b921fd06b1c812f1172685b8b7edc0608af7 && cd ..
18+
cd llvm-project && git checkout 0913547d0e3939cc420e88ecd037240f33736820 && cd ..
1919
```
2020

2121
[same-as-file]: <> (utils/build-mlir.sh)

docs/BuildOnWindows.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Install MLIR (as a part of LLVM-Project):
5252
```shell
5353
git clone -n https://github.com/llvm/llvm-project.git
5454
# Check out a specific branch that is known to work with ONNX-MLIR.
55-
cd llvm-project && git checkout 6461b921fd06b1c812f1172685b8b7edc0608af7 && cd ..
55+
cd llvm-project && git checkout 0913547d0e3939cc420e88ecd037240f33736820 && cd ..
5656
```
5757

5858
[same-as-file]: <> (utils/build-mlir.cmd)

test/mlir/conversion/onnx_to_stablehlo/Math/Elementwise.mlir

+6-6
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func.func @test_elu(%arg0 : tensor<20x40xf32>) -> tensor<20x40xf32> {
5959
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.exponential [[PARAM_0_]] : tensor<20x40xf32>
6060
// CHECK: [[VAR_4_:%.+]] = stablehlo.subtract [[VAR_3_]], [[VAR_2_]] : tensor<20x40xf32>
6161
// CHECK-DAG: [[VAR_5_:%.+]] = stablehlo.multiply [[VAR_1_]], [[VAR_4_]] : tensor<20x40xf32>
62-
// CHECK-DAG: [[VAR_6_:%.+]] = stablehlo.compare GE, [[PARAM_0_]], [[VAR_0_]], NOTYPE : (tensor<20x40xf32>, tensor<20x40xf32>) -> tensor<20x40xi1>
62+
// CHECK-DAG: [[VAR_6_:%.+]] = stablehlo.compare GE, [[PARAM_0_]], [[VAR_0_]] : (tensor<20x40xf32>, tensor<20x40xf32>) -> tensor<20x40xi1>
6363
// CHECK: [[VAR_7_:%.+]] = stablehlo.select [[VAR_6_]], [[PARAM_0_]], [[VAR_5_]] : tensor<20x40xi1>, tensor<20x40xf32>
6464
// CHECK: return [[VAR_7_]] : tensor<20x40xf32>
6565
// CHECK: }
@@ -287,7 +287,7 @@ func.func @test_less(%arg0: tensor<3x4x5xf32>, %arg1: tensor<3x4x5xf32>) -> tens
287287
// CHECK: [[VAR_0_:%.+]] = shape.const_shape [3, 4, 5] : tensor<3xindex>
288288
// CHECK-DAG: [[VAR_1_:%.+]] = stablehlo.dynamic_broadcast_in_dim [[PARAM_0_]], [[VAR_0_]], dims = [0, 1, 2] : (tensor<3x4x5xf32>, tensor<3xindex>) -> tensor<3x4x5xf32>
289289
// CHECK-DAG: [[VAR_2_:%.+]] = stablehlo.dynamic_broadcast_in_dim [[PARAM_1_]], [[VAR_0_]], dims = [0, 1, 2] : (tensor<3x4x5xf32>, tensor<3xindex>) -> tensor<3x4x5xf32>
290-
// CHECK: [[VAR_3_:%.+]] = stablehlo.compare LT, [[VAR_1_]], [[VAR_2_]], NOTYPE : (tensor<3x4x5xf32>, tensor<3x4x5xf32>) -> tensor<3x4x5xi1>
290+
// CHECK: [[VAR_3_:%.+]] = stablehlo.compare LT, [[VAR_1_]], [[VAR_2_]] : (tensor<3x4x5xf32>, tensor<3x4x5xf32>) -> tensor<3x4x5xi1>
291291
// CHECK: return [[VAR_3_]] : tensor<3x4x5xi1>
292292
// CHECK: }
293293

@@ -305,7 +305,7 @@ func.func @test_binary_elementwise_op_template_unknown_dims(%arg0: tensor<?x4x5x
305305
// CHECK: [[VAR_2_:%.+]] = shape.broadcast [[VAR_0_]], [[VAR_1_]] : tensor<3xindex>, tensor<3xindex> -> tensor<3xindex>
306306
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.dynamic_broadcast_in_dim [[PARAM_0_]], [[VAR_2_]], dims = [0, 1, 2] : (tensor<?x4x5xf32>, tensor<3xindex>) -> tensor<?x4x5xf32>
307307
// CHECK-DAG: [[VAR_4_:%.+]] = stablehlo.dynamic_broadcast_in_dim [[PARAM_1_]], [[VAR_2_]], dims = [0, 1, 2] : (tensor<1x?x1xf32>, tensor<3xindex>) -> tensor<?x4x5xf32>
308-
// CHECK: [[VAR_5_:%.+]] = stablehlo.compare LT, [[VAR_3_]], [[VAR_4_]], NOTYPE : (tensor<?x4x5xf32>, tensor<?x4x5xf32>) -> tensor<?x4x5xi1>
308+
// CHECK: [[VAR_5_:%.+]] = stablehlo.compare LT, [[VAR_3_]], [[VAR_4_]] : (tensor<?x4x5xf32>, tensor<?x4x5xf32>) -> tensor<?x4x5xi1>
309309
// CHECK: return [[VAR_5_]] : tensor<?x4x5xi1>
310310
// CHECK: }
311311

@@ -323,7 +323,7 @@ func.func @test_less_unknown_dims_2(%arg0: tensor<?x?x5xf32>, %arg1: tensor<?x4x
323323
// CHECK: [[VAR_2_:%.+]] = shape.broadcast [[VAR_0_]], [[VAR_1_]] : tensor<3xindex>, tensor<3xindex> -> tensor<3xindex>
324324
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.dynamic_broadcast_in_dim [[PARAM_0_]], [[VAR_2_]], dims = [0, 1, 2] : (tensor<?x?x5xf32>, tensor<3xindex>) -> tensor<?x4x5xf32>
325325
// CHECK-DAG: [[VAR_4_:%.+]] = stablehlo.dynamic_broadcast_in_dim [[PARAM_1_]], [[VAR_2_]], dims = [0, 1, 2] : (tensor<?x4x5xf32>, tensor<3xindex>) -> tensor<?x4x5xf32>
326-
// CHECK: [[VAR_5_:%.+]] = stablehlo.compare LT, [[VAR_3_]], [[VAR_4_]], NOTYPE : (tensor<?x4x5xf32>, tensor<?x4x5xf32>) -> tensor<?x4x5xi1>
326+
// CHECK: [[VAR_5_:%.+]] = stablehlo.compare LT, [[VAR_3_]], [[VAR_4_]] : (tensor<?x4x5xf32>, tensor<?x4x5xf32>) -> tensor<?x4x5xi1>
327327
// CHECK: return [[VAR_5_]] : tensor<?x4x5xi1>
328328
// CHECK: }
329329

@@ -447,7 +447,7 @@ func.func @test_leakyrelu_dynamic(%arg0 : tensor<?x10xf32>) -> tensor<?x10xf32>
447447
// CHECK-DAG: [[VAR_4_:%.+]] = stablehlo.multiply [[PARAM_0_]], [[VAR_3_]] : tensor<?x10xf32>
448448
// CHECK-DAG: [[VAR_5_:%.+]] = shape.shape_of [[PARAM_0_]] : tensor<?x10xf32> -> tensor<2xindex>
449449
// CHECK: [[VAR_6_:%.+]] = stablehlo.dynamic_broadcast_in_dim [[VAR_0_]], [[VAR_5_]], dims = [] : (tensor<f32>, tensor<2xindex>) -> tensor<?x10xf32>
450-
// CHECK: [[VAR_7_:%.+]] = stablehlo.compare GT, [[PARAM_0_]], [[VAR_6_]], NOTYPE : (tensor<?x10xf32>, tensor<?x10xf32>) -> tensor<?x10xi1>
450+
// CHECK: [[VAR_7_:%.+]] = stablehlo.compare GT, [[PARAM_0_]], [[VAR_6_]] : (tensor<?x10xf32>, tensor<?x10xf32>) -> tensor<?x10xi1>
451451
// CHECK: [[VAR_8_:%.+]] = stablehlo.select [[VAR_7_]], [[PARAM_0_]], [[VAR_4_]] : tensor<?x10xi1>, tensor<?x10xf32>
452452
// CHECK: return [[VAR_8_]] : tensor<?x10xf32>
453453
// CHECK: }
@@ -469,7 +469,7 @@ func.func @test_prelu_dynamic(%arg0 : tensor<?x10x12x12xf32>, %arg1: tensor<10x1
469469
// CHECK-DAG: [[VAR_6_:%.+]] = stablehlo.multiply [[VAR_4_]], [[VAR_5_]] : tensor<?x10x12x12xf32>
470470
// CHECK-DAG: [[VAR_7_:%.+]] = shape.shape_of [[VAR_4_]] : tensor<?x10x12x12xf32> -> tensor<4xindex>
471471
// CHECK: [[VAR_8_:%.+]] = stablehlo.dynamic_broadcast_in_dim [[VAR_0_]], [[VAR_7_]], dims = [] : (tensor<f32>, tensor<4xindex>) -> tensor<?x10x12x12xf32>
472-
// CHECK: [[VAR_9_:%.+]] = stablehlo.compare GT, [[VAR_4_]], [[VAR_8_]], NOTYPE : (tensor<?x10x12x12xf32>, tensor<?x10x12x12xf32>) -> tensor<?x10x12x12xi1>
472+
// CHECK: [[VAR_9_:%.+]] = stablehlo.compare GT, [[VAR_4_]], [[VAR_8_]] : (tensor<?x10x12x12xf32>, tensor<?x10x12x12xf32>) -> tensor<?x10x12x12xi1>
473473
// CHECK: [[VAR_10_:%.+]] = stablehlo.select [[VAR_9_]], [[VAR_4_]], [[VAR_6_]] : tensor<?x10x12x12xi1>, tensor<?x10x12x12xf32>
474474
// CHECK: return [[VAR_10_]] : tensor<?x10x12x12xf32>
475475
// CHECK: }

test/mlir/conversion/onnx_to_stablehlo/RNN/LSTM-loop.mlir

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func.func @test_lstm_loop(%arg0 : tensor<128x16x512xf32>, %arg1 : tensor<2x2048x
7676
// CHECK-DAG: [[VAR_48_:%.+]] = stablehlo.slice [[VAR_32_]] [1792:2048] : (tensor<2048xf32>) -> tensor<256xf32>
7777
// CHECK-DAG: [[VAR_49_:%.+]]:4 = stablehlo.while([[VAR_iterArg_:%.+]] = [[VAR_c_7_]], [[VAR_iterArg_9_:%.+]] = [[VAR_cst_5_]], [[VAR_iterArg_10_:%.+]] = [[VAR_10_]], [[VAR_iterArg_11_:%.+]] = [[VAR_12_]]) : tensor<1xi64>, tensor<128x1x16x256xf32>, tensor<16x256xf32>, tensor<16x256xf32>
7878
// CHECK: cond {
79-
// CHECK: [[VAR_52_:%.+]] = stablehlo.compare LT, [[VAR_iterArg_]], [[VAR_c_4_]], NOTYPE : (tensor<1xi64>, tensor<1xi64>) -> tensor<1xi1>
79+
// CHECK: [[VAR_52_:%.+]] = stablehlo.compare LT, [[VAR_iterArg_]], [[VAR_c_4_]] : (tensor<1xi64>, tensor<1xi64>) -> tensor<1xi1>
8080
// CHECK: [[VAR_53_:%.+]] = stablehlo.reshape [[VAR_52_]] : (tensor<1xi1>) -> tensor<i1>
8181
// CHECK: stablehlo.return [[VAR_53_]] : tensor<i1>
8282
// CHECK: } do {
@@ -156,7 +156,7 @@ func.func @test_lstm_loop(%arg0 : tensor<128x16x512xf32>, %arg1 : tensor<2x2048x
156156
// CHECK: }
157157
// CHECK: [[VAR_50_:%.+]]:4 = stablehlo.while([[VAR_iterArg_1_:%.+]] = [[VAR_c_]], [[VAR_iterArg_9_1_:%.+]] = [[VAR_c_]]st_5, [[VAR_iterArg_10_1_:%.+]] = [[VAR_14_]], [[VAR_iterArg_11_1_:%.+]] = [[VAR_16_]]) : tensor<1xi64>, tensor<128x1x16x256xf32>, tensor<16x256xf32>, tensor<16x256xf32>
158158
// CHECK: cond {
159-
// CHECK: [[VAR_52_2_:%.+]] = stablehlo.compare GE, [[VAR_iterArg_1_]], [[VAR_c_7_]], NOTYPE : (tensor<1xi64>, tensor<1xi64>) -> tensor<1xi1>
159+
// CHECK: [[VAR_52_2_:%.+]] = stablehlo.compare GE, [[VAR_iterArg_1_]], [[VAR_c_7_]] : (tensor<1xi64>, tensor<1xi64>) -> tensor<1xi1>
160160
// CHECK: [[VAR_53_2_:%.+]] = stablehlo.reshape [[VAR_52_2_]] : (tensor<1xi1>) -> tensor<i1>
161161
// CHECK: stablehlo.return [[VAR_53_2_]] : tensor<i1>
162162
// CHECK: } do {

test/mlir/conversion/onnx_to_stablehlo/Tensor/ArgMax.mlir

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ func.func @test_argmax_verifier_1(%arg0 : tensor<5x5x1x32xf32>) -> tensor<*xi64>
1313
// CHECK: [[VAR_3_:%.+]] = stablehlo.dynamic_iota [[VAR_0_]], dim = 3 : (tensor<4xindex>) -> tensor<5x5x1x32xi64>
1414
// CHECK: [[VAR_4_:%.+]]:2 = stablehlo.reduce(%arg0 init: [[VAR_2_]]), (%1 init: [[VAR_1_]]) across dimensions = [3] : (tensor<5x5x1x32xf32>, tensor<5x5x1x32xi64>, tensor<f32>, tensor<i64>) -> (tensor<5x5x1xf32>, tensor<5x5x1xi64>)
1515
// CHECK: reducer(%arg1: tensor<f32>, %arg3: tensor<f32>) (%arg2: tensor<i64>, %arg4: tensor<i64>) {
16-
// CHECK: [[VAR_6_:%.+]] = stablehlo.compare GE, %arg1, %arg3, NOTYPE : (tensor<f32>, tensor<f32>) -> tensor<i1>
16+
// CHECK: [[VAR_6_:%.+]] = stablehlo.compare GE, %arg1, %arg3 : (tensor<f32>, tensor<f32>) -> tensor<i1>
1717
// CHECK-DAG: [[VAR_7_:%.+]] = stablehlo.select [[VAR_6_]], %arg1, %arg3 : tensor<i1>, tensor<f32>
18-
// CHECK-DAG: [[VAR_8_:%.+]] = stablehlo.compare EQ, %arg1, %arg3, NOTYPE : (tensor<f32>, tensor<f32>) -> tensor<i1>
18+
// CHECK-DAG: [[VAR_8_:%.+]] = stablehlo.compare EQ, %arg1, %arg3 : (tensor<f32>, tensor<f32>) -> tensor<i1>
1919
// CHECK-DAG: [[VAR_9_:%.+]] = stablehlo.minimum %arg2, %arg4 : tensor<i64>
2020
// CHECK-DAG: [[VAR_10_:%.+]] = stablehlo.select [[VAR_6_]], %arg2, %arg4 : tensor<i1>, tensor<i64>
2121
// CHECK: [[VAR_11_:%.+]] = stablehlo.select [[VAR_8_]], [[VAR_9_]], [[VAR_10_]] : tensor<i1>, tensor<i64>
@@ -43,9 +43,9 @@ func.func @test_argmax_verifier_2(%arg0 : tensor<5x?x1x32xf32>) -> tensor<*xi64>
4343
// CHECK: [[VAR_3_:%.+]] = stablehlo.dynamic_iota [[VAR_2_]], dim = 3 : (tensor<4xindex>) -> tensor<5x?x1x32xi64>
4444
// CHECK: [[VAR_4_:%.+]]:2 = stablehlo.reduce([[PARAM_0_]] init: [[VAR_0_]]), ([[VAR_3_]] init: [[VAR_1_]]) across dimensions = [3] : (tensor<5x?x1x32xf32>, tensor<5x?x1x32xi64>, tensor<f32>, tensor<i64>) -> (tensor<5x?x1xf32>, tensor<5x?x1xi64>)
4545
// CHECK: reducer(%arg1: tensor<f32>, %arg3: tensor<f32>) (%arg2: tensor<i64>, %arg4: tensor<i64>) {
46-
// CHECK: [[VAR_11_:%.+]] = stablehlo.compare GE, %arg1, %arg3, NOTYPE : (tensor<f32>, tensor<f32>) -> tensor<i1>
46+
// CHECK: [[VAR_11_:%.+]] = stablehlo.compare GE, %arg1, %arg3 : (tensor<f32>, tensor<f32>) -> tensor<i1>
4747
// CHECK-DAG: [[VAR_12_:%.+]] = stablehlo.select [[VAR_11_]], %arg1, %arg3 : tensor<i1>, tensor<f32>
48-
// CHECK-DAG: [[VAR_13_:%.+]] = stablehlo.compare EQ, %arg1, %arg3, NOTYPE : (tensor<f32>, tensor<f32>) -> tensor<i1>
48+
// CHECK-DAG: [[VAR_13_:%.+]] = stablehlo.compare EQ, %arg1, %arg3 : (tensor<f32>, tensor<f32>) -> tensor<i1>
4949
// CHECK-DAG: [[VAR_14_:%.+]] = stablehlo.minimum %arg2, %arg4 : tensor<i64>
5050
// CHECK-DAG: [[VAR_15_:%.+]] = stablehlo.select [[VAR_11_]], %arg2, %arg4 : tensor<i1>, tensor<i64>
5151
// CHECK: [[VAR_16_:%.+]] = stablehlo.select [[VAR_13_]], [[VAR_14_]], [[VAR_15_]] : tensor<i1>, tensor<i64>

test/mlir/conversion/onnx_to_stablehlo/Tensor/Gather.mlir

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func.func @test_gather_axis0(%arg0 : tensor<3x2xf32>) -> tensor<2x2x2xf32> {
1212
// CHECK-DAG: [[VAR_1_:%.+]] = stablehlo.constant dense<0> : tensor<2x2xi64>
1313
// CHECK-DAG: [[VAR_2_:%.+]] = stablehlo.constant dense<3> : tensor<2x2xi64>
1414
// CHECK-NOT: separator of consecutive DAGs
15-
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[VAR_0_]], [[VAR_1_]], NOTYPE : (tensor<2x2xi64>, tensor<2x2xi64>) -> tensor<2x2xi1>
15+
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[VAR_0_]], [[VAR_1_]] : (tensor<2x2xi64>, tensor<2x2xi64>) -> tensor<2x2xi1>
1616
// CHECK-DAG: [[VAR_4_:%.+]] = stablehlo.add [[VAR_0_]], [[VAR_2_]] : tensor<2x2xi64>
1717
// CHECK: [[VAR_5_:%.+]] = stablehlo.select [[VAR_3_]], [[VAR_4_]], [[VAR_0_]] : tensor<2x2xi1>, tensor<2x2xi64>
1818
// CHECK: [[VAR_6_:%.+]] = "stablehlo.torch_index_select"([[PARAM_0_]], [[VAR_5_]]) <{batch_dims = 0 : i64, dim = 0 : i64}> : (tensor<3x2xf32>, tensor<2x2xi64>) -> tensor<2x2x2xf32>
@@ -39,7 +39,7 @@ func.func @test_gather_dynamic_axis0(%arg0 : tensor<?x?xf32>) -> tensor<2x2x?xf3
3939
// CHECK-DAG: [[DIM_TENSOR_:%.+]] = tensor.from_elements [[DIM_CAST_]] : tensor<i64>
4040
// CHECK-DAG: [[VAR_2_:%.+]] = stablehlo.dynamic_broadcast_in_dim [[DIM_TENSOR_]], [[INDICES_SHAPE_]], dims = [] : (tensor<i64>, tensor<2xindex>) -> tensor<2x2xi64>
4141
// CHECK-NOT: separator of consecutive DAGs
42-
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[VAR_0_]], [[VAR_1_]], NOTYPE : (tensor<2x2xi64>, tensor<2x2xi64>) -> tensor<2x2xi1>
42+
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[VAR_0_]], [[VAR_1_]] : (tensor<2x2xi64>, tensor<2x2xi64>) -> tensor<2x2xi1>
4343
// CHECK-DAG: [[VAR_4_:%.+]] = stablehlo.add [[VAR_0_]], [[VAR_2_]] : tensor<2x2xi64>
4444
// CHECK: [[VAR_5_:%.+]] = stablehlo.select [[VAR_3_]], [[VAR_4_]], [[VAR_0_]] : tensor<2x2xi1>, tensor<2x2xi64>
4545
// CHECK: [[VAR_6_:%.+]] = "stablehlo.torch_index_select"([[PARAM_0_]], [[VAR_5_]]) <{batch_dims = 0 : i64, dim = 0 : i64}> : (tensor<?x?xf32>, tensor<2x2xi64>) -> tensor<2x2x?xf32>
@@ -60,7 +60,7 @@ func.func @test_gather_axis0neg(%arg0 : tensor<3x2xf32>) -> tensor<2x2x2xf32> {
6060
// CHECK-DAG: [[VAR_1_:%.+]] = stablehlo.constant dense<0> : tensor<2x2xi64>
6161
// CHECK-DAG: [[VAR_2_:%.+]] = stablehlo.constant dense<3> : tensor<2x2xi64>
6262
// CHECK-NOT: separator of consecutive DAGs
63-
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[VAR_0_]], [[VAR_1_]], NOTYPE : (tensor<2x2xi64>, tensor<2x2xi64>) -> tensor<2x2xi1>
63+
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[VAR_0_]], [[VAR_1_]] : (tensor<2x2xi64>, tensor<2x2xi64>) -> tensor<2x2xi1>
6464
// CHECK-DAG: [[VAR_4_:%.+]] = stablehlo.add [[VAR_0_]], [[VAR_2_]] : tensor<2x2xi64>
6565
// CHECK: [[VAR_5_:%.+]] = stablehlo.select [[VAR_3_]], [[VAR_4_]], [[VAR_0_]] : tensor<2x2xi1>, tensor<2x2xi64>
6666
// CHECK: [[VAR_6_:%.+]] = "stablehlo.torch_index_select"([[PARAM_0_]], [[VAR_5_]]) <{batch_dims = 0 : i64, dim = 0 : i64}> : (tensor<3x2xf32>, tensor<2x2xi64>) -> tensor<2x2x2xf32>
@@ -81,7 +81,7 @@ func.func @test_gather_axis1(%arg0 : tensor<3x3xf32>) -> tensor<3x1x2xf32> {
8181
// CHECK-DAG: [[VAR_1_:%.+]] = stablehlo.constant dense<0> : tensor<1x2xi64>
8282
// CHECK-DAG: [[VAR_2_:%.+]] = stablehlo.constant dense<3> : tensor<1x2xi64>
8383
// CHECK-NOT: separator of consecutive DAGs
84-
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[VAR_0_]], [[VAR_1_]], NOTYPE : (tensor<1x2xi64>, tensor<1x2xi64>) -> tensor<1x2xi1>
84+
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[VAR_0_]], [[VAR_1_]] : (tensor<1x2xi64>, tensor<1x2xi64>) -> tensor<1x2xi1>
8585
// CHECK-DAG: [[VAR_4_:%.+]] = stablehlo.add [[VAR_0_]], [[VAR_2_]] : tensor<1x2xi64>
8686
// CHECK: [[VAR_5_:%.+]] = stablehlo.select [[VAR_3_]], [[VAR_4_]], [[VAR_0_]] : tensor<1x2xi1>, tensor<1x2xi64>
8787
// CHECK: [[VAR_6_:%.+]] = "stablehlo.torch_index_select"([[PARAM_0_]], [[VAR_5_]]) <{batch_dims = 0 : i64, dim = 1 : i64}> : (tensor<3x3xf32>, tensor<1x2xi64>) -> tensor<3x1x2xf32>

test/mlir/conversion/onnx_to_stablehlo/Tensor/GatherElements.mlir

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ func.func @main_gather_elements(%arg0: tensor<3x2xf32>, %arg1: tensor<2x2xi64>)
88
// CHECK-DAG: [[VAR_0_:%.+]] = stablehlo.constant dense<3> : tensor<i64>
99
// CHECK-DAG: [[VAR_1_:%.+]] = stablehlo.constant dense<0> : tensor<2x2xi64>
1010
// CHECK-DAG: [[VAR_2_:%.+]] = stablehlo.broadcast_in_dim [[VAR_0_]], dims = [] : (tensor<i64>) -> tensor<2x2xi64>
11-
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[PARAM_1_]], [[VAR_1_]], NOTYPE : (tensor<2x2xi64>, tensor<2x2xi64>) -> tensor<2x2xi1>
11+
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[PARAM_1_]], [[VAR_1_]] : (tensor<2x2xi64>, tensor<2x2xi64>) -> tensor<2x2xi1>
1212
// CHECK-DAG: [[VAR_4_:%.+]] = stablehlo.add [[PARAM_1_]], [[VAR_2_]] : tensor<2x2xi64>
1313
// CHECK-NEXT: [[VAR_5_:%.+]] = stablehlo.select [[VAR_3_]], [[VAR_4_]], [[PARAM_1_]] : tensor<2x2xi1>, tensor<2x2xi64>
1414
// CHECK-DAG: [[VAR_6_:%.+]] = stablehlo.dynamic_reshape [[VAR_5_]], [[CST_]] : (tensor<2x2xi64>, tensor<3xindex>) -> tensor<2x2x1xi64>

test/mlir/conversion/onnx_to_stablehlo/Tensor/OneHot.mlir

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ func.func @test_onehot(%arg0 : tensor<2x3x4xi64>) -> tensor<*xi64> {
1616
// CHECK-DAG: [[VAR_5_:%.+]] = stablehlo.broadcast_in_dim [[VAR_0_]], dims = [] : (tensor<i64>) -> tensor<2x3x4x64xi64>
1717
// CHECK-DAG: [[VAR_6_:%.+]] = stablehlo.broadcast_in_dim [[VAR_1_]], dims = [0] : (tensor<1xi64>) -> tensor<2x3x4x64xi64>
1818
// CHECK-NOT: separator of consecutive DAGs
19-
// CHECK-DAG: [[VAR_7_:%.+]] = stablehlo.compare GE, [[VAR_4_]], [[VAR_5_]], NOTYPE : (tensor<2x3x4x64xi64>, tensor<2x3x4x64xi64>) -> tensor<2x3x4x64xi1>
19+
// CHECK-DAG: [[VAR_7_:%.+]] = stablehlo.compare GE, [[VAR_4_]], [[VAR_5_]] : (tensor<2x3x4x64xi64>, tensor<2x3x4x64xi64>) -> tensor<2x3x4x64xi1>
2020
// CHECK-DAG: [[VAR_8_:%.+]] = stablehlo.add [[VAR_4_]], [[VAR_6_]] : tensor<2x3x4x64xi64>
2121
// CHECK: [[VAR_9_:%.+]] = stablehlo.select [[VAR_7_]], [[VAR_4_]], [[VAR_8_]] : tensor<2x3x4x64xi1>, tensor<2x3x4x64xi64>
22-
// CHECK-DAG: [[VAR_10_:%.+]] = stablehlo.compare EQ, [[VAR_9_]], [[VAR_3_]], NOTYPE : (tensor<2x3x4x64xi64>, tensor<2x3x4x64xi64>) -> tensor<2x3x4x64xi1>
22+
// CHECK-DAG: [[VAR_10_:%.+]] = stablehlo.compare EQ, [[VAR_9_]], [[VAR_3_]] : (tensor<2x3x4x64xi64>, tensor<2x3x4x64xi64>) -> tensor<2x3x4x64xi1>
2323
// CHECK-DAG: [[VAR_11_:%.+]] = stablehlo.slice [[VAR_2_]] [0:1] : (tensor<2xi64>) -> tensor<1xi64>
2424
// CHECK-DAG: [[VAR_12_:%.+]] = stablehlo.slice [[VAR_2_]] [1:2] : (tensor<2xi64>) -> tensor<1xi64>
2525
// CHECK-NOT: separator of consecutive DAGs

0 commit comments

Comments
 (0)