Skip to content

Bump LLVM commit to 20ed5b1f4587 #2799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/BuildOnLinuxOSX.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Firstly, install MLIR (as a part of LLVM-Project):
``` bash
git clone -n https://github.com/llvm/llvm-project.git
# Check out a specific branch that is known to work with ONNX-MLIR.
cd llvm-project && git checkout 7ac7d418ac2b16fd44789dcf48e2b5d73de3e715 && cd ..
cd llvm-project && git checkout 1e6ce5e284f5c0e8d64eee21af727bb164eb3caf && cd ..
```

[same-as-file]: <> (utils/build-mlir.sh)
Expand Down
2 changes: 1 addition & 1 deletion docs/BuildOnWindows.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Install MLIR (as a part of LLVM-Project):
```shell
git clone -n https://github.com/llvm/llvm-project.git
# Check out a specific branch that is known to work with ONNX-MLIR.
cd llvm-project && git checkout 7ac7d418ac2b16fd44789dcf48e2b5d73de3e715 && cd ..
cd llvm-project && git checkout 1e6ce5e284f5c0e8d64eee21af727bb164eb3caf && cd ..
```

[same-as-file]: <> (utils/build-mlir.cmd)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ func.func @test_sequence_erase(%arg0: !onnx.Seq<tensor<?x4x5xf32>>) -> tensor<3x
// CHECK-DAG: [[MAP_0_:#.+]] = affine_map<()[s0] -> (s0 - 1)>
// CHECK-DAG: [[MAP_1_:#.+]] = affine_map<()[s0, s1] -> (s1 + s0)>
// CHECK-DAG: [[MAP_2_:#.+]] = affine_map<()[s0, s1] -> (s0)>
// CHECK-DAG: [[MAP_3_:#.+]] = affine_map<()[s0, s1] -> (s0 + s1)>
// CHECK-LABEL: func.func @test_sequence_erase
// CHECK-SAME: ([[PARAM_0_:%.+]]: memref<?xmemref<?x4x5xf32>>) -> memref<3xi64> {
// CHECK-DAG: [[VAR_0_:%.+]] = "krnl.global"() {name = "constant_{{[0-9]+}}", shape = [], value = dense<0> : tensor<i64>} : () -> memref<i64>
Expand Down Expand Up @@ -55,7 +54,7 @@ func.func @test_sequence_erase(%arg0: !onnx.Seq<tensor<?x4x5xf32>>) -> tensor<3x
// CHECK-DAG: [[CST_0_4_:%.+]] = arith.constant 0 : index
// CHECK-NOT: separator of consecutive DAGs
// CHECK-DAG: [[VAR_13_:%.+]] = arith.cmpi slt, [[VAR_12_]], [[CST_0_4_]] : index
// CHECK-DAG: [[VAR_14_:%.+]] = affine.apply [[MAP_3_]](){{.}}[[VAR_12_]], [[VAR_dim_4_]]{{.}}
// CHECK-DAG: [[VAR_14_:%.+]] = affine.apply [[MAP_1_]](){{.}}[[VAR_dim_4_]], [[VAR_12_]]{{.}}
// CHECK: [[VAR_15_:%.+]] = arith.select [[VAR_13_]], [[VAR_14_]], [[VAR_12_]] : index
// CHECK-DAG: [[VAR_16_:%.+]] = "krnl.seqextract"([[VAR_2_]], [[VAR_15_]]) {copy = 1 : ui1} : (memref<?xmemref<?x4x5xf32>>, index) -> memref<?x4x5xf32>
// CHECK-DAG: [[CST_3_:%.+]] = arith.constant 3 : index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func.func @test_batch_normalization(%arg0 : tensor<1x3x10x10xf32>) -> tensor<1x3
// CHECK-NEXT: [[VAR_1_:%.+]] = stablehlo.constant dense<1.000000e+00> : tensor<3xf32>
// CHECK-NEXT: [[VAR_2_:%.+]] = stablehlo.constant dense<1.000000e+00> : tensor<3xf32>
// CHECK-NEXT: [[VAR_3_:%.+]] = stablehlo.constant dense<1.000000e+00> : tensor<3xf32>
// CHECK-NEXT: [[VAR_4_:%.+]] = "stablehlo.batch_norm_inference"(%arg0, %0, %1, %2, %3) {epsilon = 1.00000007E-5 : f32, feature_index = 1 : i64} : (tensor<1x3x10x10xf32>, tensor<3xf32>, tensor<3xf32>, tensor<3xf32>, tensor<3xf32>) -> tensor<1x3x10x10xf32>
// CHECK-NEXT: [[VAR_4_:%.+]] = "stablehlo.batch_norm_inference"(%arg0, %0, %1, %2, %3) <{epsilon = 1.00000007E-5 : f32, feature_index = 1 : i64}> : (tensor<1x3x10x10xf32>, tensor<3xf32>, tensor<3xf32>, tensor<3xf32>, tensor<3xf32>) -> tensor<1x3x10x10xf32>
// CHECK-NEXT: return [[VAR_4_]] : tensor<1x3x10x10xf32>
// CHECK-NEXT: }
}
68 changes: 34 additions & 34 deletions test/mlir/conversion/onnx_to_stablehlo/NN/Pooling.mlir

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions test/mlir/conversion/onnx_to_stablehlo/RNN/LSTM-loop.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ func.func @test_lstm_loop(%arg0 : tensor<128x16x512xf32>, %arg1 : tensor<2x2048x
// CHECK: [[VAR_119_:%.+]] = stablehlo.multiply [[VAR_117_]], [[VAR_118_]] : tensor<16x256xf32>
// CHECK-DAG: [[VAR_120_:%.+]] = stablehlo.dynamic_reshape [[VAR_119_]], [[VAR_3_]] : (tensor<16x256xf32>, tensor<4xindex>) -> tensor<1x1x16x256xf32>
// CHECK-DAG: [[VAR_121_:%.+]] = stablehlo.dynamic_reshape [[VAR_iterArg_]], [[VAR_2_]] : (tensor<1xi64>, tensor<2xindex>) -> tensor<1x1xi64>
// CHECK: [[VAR_122_:%.+]] = "stablehlo.scatter"([[VAR_iterArg_0_]], [[VAR_121_]], [[VAR_120_]]) ({
// CHECK: [[VAR_122_:%.+]] = "stablehlo.scatter"([[VAR_iterArg_0_]], [[VAR_121_]], [[VAR_120_]]) <{indices_are_sorted = false, scatter_dimension_numbers = #stablehlo.scatter<update_window_dims = [1, 2, 3], inserted_window_dims = [0], scatter_dims_to_operand_dims = [0], index_vector_dim = 1>, unique_indices = false}> ({
// CHECK: ^bb0([[arg4_:%.+]]: tensor<f32>, [[arg5_:%.+]]: tensor<f32>):
// CHECK: stablehlo.return [[arg5_]] : tensor<f32>
// CHECK: }) {indices_are_sorted = false, scatter_dimension_numbers = #stablehlo.scatter<update_window_dims = [1, 2, 3], inserted_window_dims = [0], scatter_dims_to_operand_dims = [0], index_vector_dim = 1>, unique_indices = false} : (tensor<128x1x16x256xf32>, tensor<1x1xi64>, tensor<1x1x16x256xf32>) -> tensor<128x1x16x256xf32>
// CHECK: }) : (tensor<128x1x16x256xf32>, tensor<1x1xi64>, tensor<1x1x16x256xf32>) -> tensor<128x1x16x256xf32>
// CHECK-DAG: [[VAR_123_:%.+]] = stablehlo.dynamic_broadcast_in_dim [[VAR_iterArg_]], [[VAR_1_]], dims = [0] : (tensor<1xi64>, tensor<1xindex>) -> tensor<1xi64>
// CHECK-DAG: [[VAR_124_:%.+]] = stablehlo.dynamic_broadcast_in_dim [[VAR_10_]], [[VAR_1_]], dims = [0] : (tensor<1xi64>, tensor<1xindex>) -> tensor<1xi64>
// CHECK: [[VAR_125_:%.+]] = stablehlo.add [[VAR_123_]], [[VAR_124_]] : tensor<1xi64>
Expand Down Expand Up @@ -225,10 +225,10 @@ func.func @test_lstm_loop(%arg0 : tensor<128x16x512xf32>, %arg1 : tensor<2x2048x
// CHECK: [[VAR_119_1_:%.+]] = stablehlo.multiply [[VAR_117_1_]], [[VAR_118_1_]] : tensor<16x256xf32>
// CHECK-DAG: [[VAR_120_1_:%.+]] = stablehlo.dynamic_reshape [[VAR_119_1_]], [[VAR_3_]] : (tensor<16x256xf32>, tensor<4xindex>) -> tensor<1x1x16x256xf32>
// CHECK-DAG: [[VAR_121_1_:%.+]] = stablehlo.dynamic_reshape [[VAR_iterArg_1_]], [[VAR_2_]] : (tensor<1xi64>, tensor<2xindex>) -> tensor<1x1xi64>
// CHECK: [[VAR_122_1_:%.+]] = "stablehlo.scatter"([[VAR_iterArg_0_1_]], [[VAR_121_1_]], [[VAR_120_1_]]) ({
// CHECK: [[VAR_122_1_:%.+]] = "stablehlo.scatter"([[VAR_iterArg_0_1_]], [[VAR_121_1_]], [[VAR_120_1_]]) <{indices_are_sorted = false, scatter_dimension_numbers = #stablehlo.scatter<update_window_dims = [1, 2, 3], inserted_window_dims = [0], scatter_dims_to_operand_dims = [0], index_vector_dim = 1>, unique_indices = false}> ({
// CHECK: ^bb0([[arg4_:%.+]]: tensor<f32>, [[arg5_:%.+]]: tensor<f32>):
// CHECK: stablehlo.return [[arg5_]] : tensor<f32>
// CHECK: }) {indices_are_sorted = false, scatter_dimension_numbers = #stablehlo.scatter<update_window_dims = [1, 2, 3], inserted_window_dims = [0], scatter_dims_to_operand_dims = [0], index_vector_dim = 1>, unique_indices = false} : (tensor<128x1x16x256xf32>, tensor<1x1xi64>, tensor<1x1x16x256xf32>) -> tensor<128x1x16x256xf32>
// CHECK: }) : (tensor<128x1x16x256xf32>, tensor<1x1xi64>, tensor<1x1x16x256xf32>) -> tensor<128x1x16x256xf32>
// CHECK-DAG: [[VAR_123_1_:%.+]] = stablehlo.dynamic_broadcast_in_dim [[VAR_iterArg_1_]], [[VAR_1_]], dims = [0] : (tensor<1xi64>, tensor<1xindex>) -> tensor<1xi64>
// CHECK-DAG: [[VAR_124_1_:%.+]] = stablehlo.dynamic_broadcast_in_dim [[VAR_10_]], [[VAR_1_]], dims = [0] : (tensor<1xi64>, tensor<1xindex>) -> tensor<1xi64>
// CHECK: [[VAR_125_1_:%.+]] = stablehlo.subtract [[VAR_123_1_]], [[VAR_124_1_]] : tensor<1xi64>
Expand Down
8 changes: 4 additions & 4 deletions test/mlir/conversion/onnx_to_stablehlo/Tensor/Gather.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func.func @test_gather_axis0(%arg0 : tensor<3x2xf32>) -> tensor<2x2x2xf32> {
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[VAR_0_]], [[VAR_1_]], NOTYPE : (tensor<2x2xi64>, tensor<2x2xi64>) -> tensor<2x2xi1>
// CHECK-DAG: [[VAR_4_:%.+]] = stablehlo.add [[VAR_0_]], [[VAR_2_]] : tensor<2x2xi64>
// CHECK: [[VAR_5_:%.+]] = stablehlo.select [[VAR_3_]], [[VAR_4_]], [[VAR_0_]] : tensor<2x2xi1>, tensor<2x2xi64>
// CHECK: [[VAR_6_:%.+]] = "stablehlo.torch_index_select"([[PARAM_0_]], [[VAR_5_]]) {batch_dims = 0 : i64, dim = 0 : i64} : (tensor<3x2xf32>, tensor<2x2xi64>) -> tensor<2x2x2xf32>
// CHECK: [[VAR_6_:%.+]] = "stablehlo.torch_index_select"([[PARAM_0_]], [[VAR_5_]]) <{batch_dims = 0 : i64, dim = 0 : i64}> : (tensor<3x2xf32>, tensor<2x2xi64>) -> tensor<2x2x2xf32>
// CHECK: return [[VAR_6_]] : tensor<2x2x2xf32>
// CHECK: }

Expand All @@ -42,7 +42,7 @@ func.func @test_gather_dynamic_axis0(%arg0 : tensor<?x?xf32>) -> tensor<2x2x?xf3
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[VAR_0_]], [[VAR_1_]], NOTYPE : (tensor<2x2xi64>, tensor<2x2xi64>) -> tensor<2x2xi1>
// CHECK-DAG: [[VAR_4_:%.+]] = stablehlo.add [[VAR_0_]], [[VAR_2_]] : tensor<2x2xi64>
// CHECK: [[VAR_5_:%.+]] = stablehlo.select [[VAR_3_]], [[VAR_4_]], [[VAR_0_]] : tensor<2x2xi1>, tensor<2x2xi64>
// 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>
// 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>
// CHECK: return [[VAR_6_]] : tensor<2x2x?xf32>
// CHECK: }

Expand All @@ -63,7 +63,7 @@ func.func @test_gather_axis0neg(%arg0 : tensor<3x2xf32>) -> tensor<2x2x2xf32> {
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[VAR_0_]], [[VAR_1_]], NOTYPE : (tensor<2x2xi64>, tensor<2x2xi64>) -> tensor<2x2xi1>
// CHECK-DAG: [[VAR_4_:%.+]] = stablehlo.add [[VAR_0_]], [[VAR_2_]] : tensor<2x2xi64>
// CHECK: [[VAR_5_:%.+]] = stablehlo.select [[VAR_3_]], [[VAR_4_]], [[VAR_0_]] : tensor<2x2xi1>, tensor<2x2xi64>
// CHECK: [[VAR_6_:%.+]] = "stablehlo.torch_index_select"([[PARAM_0_]], [[VAR_5_]]) {batch_dims = 0 : i64, dim = 0 : i64} : (tensor<3x2xf32>, tensor<2x2xi64>) -> tensor<2x2x2xf32>
// CHECK: [[VAR_6_:%.+]] = "stablehlo.torch_index_select"([[PARAM_0_]], [[VAR_5_]]) <{batch_dims = 0 : i64, dim = 0 : i64}> : (tensor<3x2xf32>, tensor<2x2xi64>) -> tensor<2x2x2xf32>
// CHECK: return [[VAR_6_]] : tensor<2x2x2xf32>
// CHECK: }

Expand All @@ -84,6 +84,6 @@ func.func @test_gather_axis1(%arg0 : tensor<3x3xf32>) -> tensor<3x1x2xf32> {
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[VAR_0_]], [[VAR_1_]], NOTYPE : (tensor<1x2xi64>, tensor<1x2xi64>) -> tensor<1x2xi1>
// CHECK-DAG: [[VAR_4_:%.+]] = stablehlo.add [[VAR_0_]], [[VAR_2_]] : tensor<1x2xi64>
// CHECK: [[VAR_5_:%.+]] = stablehlo.select [[VAR_3_]], [[VAR_4_]], [[VAR_0_]] : tensor<1x2xi1>, tensor<1x2xi64>
// CHECK: [[VAR_6_:%.+]] = "stablehlo.torch_index_select"([[PARAM_0_]], [[VAR_5_]]) {batch_dims = 0 : i64, dim = 1 : i64} : (tensor<3x3xf32>, tensor<1x2xi64>) -> tensor<3x1x2xf32>
// CHECK: [[VAR_6_:%.+]] = "stablehlo.torch_index_select"([[PARAM_0_]], [[VAR_5_]]) <{batch_dims = 0 : i64, dim = 1 : i64}> : (tensor<3x3xf32>, tensor<1x2xi64>) -> tensor<3x1x2xf32>
// CHECK: return [[VAR_6_]] : tensor<3x1x2xf32>
// CHECK: }
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ func.func @main_gather_elements(%arg0: tensor<3x2xf32>, %arg1: tensor<2x2xi64>)
// CHECK-DAG: [[VAR_6_:%.+]] = stablehlo.dynamic_reshape [[VAR_5_]], [[CST_]] : (tensor<2x2xi64>, tensor<3xindex>) -> tensor<2x2x1xi64>
// CHECK-DAG: [[VAR_7_:%.+]] = stablehlo.dynamic_iota [[CST_]], dim = 1 : (tensor<3xindex>) -> tensor<2x2x1xi64>
// CHECK-NEXT: [[VAR_8_:%.+]] = stablehlo.concatenate [[VAR_6_]], [[VAR_7_]], dim = 2 : (tensor<2x2x1xi64>, tensor<2x2x1xi64>) -> tensor<2x2x2xi64>
// CHECK-NEXT: [[VAR_9_:%.+]] = "stablehlo.gather"([[PARAM_0_]], [[VAR_8_]]) {dimension_numbers = #stablehlo.gather<collapsed_slice_dims = [0, 1], start_index_map = [0, 1], index_vector_dim = 2>, indices_are_sorted = false, slice_sizes = array<i64: 1, 1>} : (tensor<3x2xf32>, tensor<2x2x2xi64>) -> tensor<2x2xf32>
// CHECK-NEXT: [[VAR_9_:%.+]] = "stablehlo.gather"([[PARAM_0_]], [[VAR_8_]]) <{dimension_numbers = #stablehlo.gather<collapsed_slice_dims = [0, 1], start_index_map = [0, 1], index_vector_dim = 2>, indices_are_sorted = false, slice_sizes = array<i64: 1, 1>}> : (tensor<3x2xf32>, tensor<2x2x2xi64>) -> tensor<2x2xf32>
// CHECK-NEXT: return [[VAR_9_]] : tensor<2x2xf32>
}
12 changes: 6 additions & 6 deletions test/mlir/conversion/onnx_to_stablehlo/Tensor/ScatterND.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ func.func @test_scatternd_1(%arg0 : tensor<8xf32>, %arg1 : tensor<4x1xi64>, %arg
return %0 : tensor<8xf32>
// CHECK-LABEL: func.func @test_scatternd_1
// CHECK-SAME: ([[PARAM_0_:%.+]]: tensor<8xf32>, [[PARAM_1_:%.+]]: tensor<4x1xi64>, [[PARAM_2_:%.+]]: tensor<4xf32>) -> tensor<8xf32> {
// CHECK: [[VAR_0_:%.+]] = "stablehlo.scatter"([[PARAM_0_]], [[PARAM_1_]], [[PARAM_2_]]) ({
// CHECK: [[VAR_0_:%.+]] = "stablehlo.scatter"([[PARAM_0_]], [[PARAM_1_]], [[PARAM_2_]]) <{indices_are_sorted = false, scatter_dimension_numbers = #stablehlo.scatter<inserted_window_dims = [0], scatter_dims_to_operand_dims = [0], index_vector_dim = 1>, unique_indices = false}> ({
// CHECK: ^bb0([[arg3_:%.+]]: tensor<f32>, [[arg4_:%.+]]: tensor<f32>):
// CHECK: stablehlo.return [[arg4_]] : tensor<f32>
// CHECK: }) {indices_are_sorted = false, scatter_dimension_numbers = #stablehlo.scatter<inserted_window_dims = [0], scatter_dims_to_operand_dims = [0], index_vector_dim = 1>, unique_indices = false} : (tensor<8xf32>, tensor<4x1xi64>, tensor<4xf32>) -> tensor<8xf32>
// CHECK: }) : (tensor<8xf32>, tensor<4x1xi64>, tensor<4xf32>) -> tensor<8xf32>
// CHECK: return [[VAR_0_]] : tensor<8xf32>
// CHECK: }
}
Expand All @@ -20,10 +20,10 @@ func.func @test_scatternd_2(%arg0 : tensor<4x4x4xi32>, %arg1 : tensor<2x1xi64>,
return %0 : tensor<4x4x4xi32>
// CHECK-LABEL: func.func @test_scatternd_2
// CHECK-SAME: ([[PARAM_0_:%.+]]: tensor<4x4x4xi32>, [[PARAM_1_:%.+]]: tensor<2x1xi64>, [[PARAM_2_:%.+]]: tensor<2x4x4xi32>) -> tensor<4x4x4xi32> {
// CHECK: [[VAR_0_:%.+]] = "stablehlo.scatter"([[PARAM_0_]], [[PARAM_1_]], [[PARAM_2_]]) ({
// CHECK: [[VAR_0_:%.+]] = "stablehlo.scatter"([[PARAM_0_]], [[PARAM_1_]], [[PARAM_2_]]) <{indices_are_sorted = false, scatter_dimension_numbers = #stablehlo.scatter<update_window_dims = [1, 2], inserted_window_dims = [0], scatter_dims_to_operand_dims = [0], index_vector_dim = 1>, unique_indices = false}> ({
// CHECK: ^bb0([[arg3_:%.+]]: tensor<i32>, [[arg4_:%.+]]: tensor<i32>):
// CHECK: stablehlo.return [[arg4_]] : tensor<i32>
// CHECK: }) {indices_are_sorted = false, scatter_dimension_numbers = #stablehlo.scatter<update_window_dims = [1, 2], inserted_window_dims = [0], scatter_dims_to_operand_dims = [0], index_vector_dim = 1>, unique_indices = false} : (tensor<4x4x4xi32>, tensor<2x1xi64>, tensor<2x4x4xi32>) -> tensor<4x4x4xi32>
// CHECK: }) : (tensor<4x4x4xi32>, tensor<2x1xi64>, tensor<2x4x4xi32>) -> tensor<4x4x4xi32>
// CHECK: return [[VAR_0_]] : tensor<4x4x4xi32>
// CHECK: }
}
Expand All @@ -35,10 +35,10 @@ func.func @test_scatternd_dynamic(%arg0 : tensor<1x?x32x128xf32>, %arg1 : tensor
return %0 : tensor<1x?x32x128xf32>
// CHECK-LABEL: func.func @test_scatternd_dynamic
// CHECK-SAME: ([[PARAM_0_:%.+]]: tensor<1x?x32x128xf32>, [[PARAM_1_:%.+]]: tensor<?x?x32x64x4xi64>, [[PARAM_2_:%.+]]: tensor<?x?x?x?xf32>) -> tensor<1x?x32x128xf32> {
// CHECK: [[VAR_0_:%.+]] = "stablehlo.scatter"([[PARAM_0_]], [[PARAM_1_]], [[PARAM_2_]]) ({
// CHECK: [[VAR_0_:%.+]] = "stablehlo.scatter"([[PARAM_0_]], [[PARAM_1_]], [[PARAM_2_]]) <{indices_are_sorted = false, scatter_dimension_numbers = #stablehlo.scatter<inserted_window_dims = [0, 1, 2, 3], scatter_dims_to_operand_dims = [0, 1, 2, 3], index_vector_dim = 4>, unique_indices = false}> ({
// CHECK: ^bb0([[arg3_:%.+]]: tensor<f32>, [[arg4_:%.+]]: tensor<f32>):
// CHECK: stablehlo.return [[arg4_]] : tensor<f32>
// CHECK: }) {indices_are_sorted = false, scatter_dimension_numbers = #stablehlo.scatter<inserted_window_dims = [0, 1, 2, 3], scatter_dims_to_operand_dims = [0, 1, 2, 3], index_vector_dim = 4>, unique_indices = false} : (tensor<1x?x32x128xf32>, tensor<?x?x32x64x4xi64>, tensor<?x?x?x?xf32>) -> tensor<1x?x32x128xf32>
// CHECK: }) : (tensor<1x?x32x128xf32>, tensor<?x?x32x64x4xi64>, tensor<?x?x?x?xf32>) -> tensor<1x?x32x128xf32>
// CHECK: return [[VAR_0_]] : tensor<1x?x32x128xf32>
// CHECK: }
}
2 changes: 1 addition & 1 deletion third_party/stablehlo
Submodule stablehlo updated 92 files
+11 −0 BUILD.bazel
+2 −2 WORKSPACE.bazel
+1 −1 build_tools/github_actions/lint_markdown.sh
+1 −1 build_tools/github_actions/lint_whitespace_checks.sh
+1 −1 build_tools/llvm_version.txt
+3 −3 docs/reference.md
+40 −4 docs/spec.md
+1 −1 docs/status.md
+2 −2 examples/c++/BUILD.bazel
+1 −1 examples/python/stablehlo_add.py
+158 −0 rfcs/20231005-hybrid-quantization.md
+495 −0 stablehlo/conversions/linalg/tests/sparse.mlir
+3 −3 stablehlo/conversions/linalg/transforms/LegalizeToLinalgUtils.cpp
+52 −50 stablehlo/conversions/linalg/transforms/MapStablehloToScalarOp.h
+6 −1 stablehlo/conversions/linalg/transforms/Passes.td
+53 −2 stablehlo/conversions/linalg/transforms/StablehloLegalizeToLinalg.cpp
+2 −2 stablehlo/conversions/linalg/transforms/StablehloToLinalgRandom.cpp
+10 −10 stablehlo/conversions/tosa/transforms/StablehloLegalizeToTosa.cpp
+4 −4 stablehlo/conversions/tosa/transforms/StablehloLegalizeToTosa.pdll
+9 −9 stablehlo/dialect/AssemblyFormat.cpp
+4 −4 stablehlo/dialect/AssemblyFormat.h
+25 −25 stablehlo/dialect/Base.cpp
+40 −1 stablehlo/dialect/Base.h
+43 −15 stablehlo/dialect/Base.td
+3 −3 stablehlo/dialect/BroadcastUtils.cpp
+1 −0 stablehlo/dialect/CMakeLists.txt
+64 −94 stablehlo/dialect/ChloOps.cpp
+0 −55 stablehlo/dialect/ChloOps.td
+1 −1 stablehlo/dialect/StablehloAttrs.td
+37 −0 stablehlo/dialect/StablehloBytecode.cpp
+198 −55 stablehlo/dialect/StablehloOps.cpp
+34 −0 stablehlo/dialect/StablehloOps.h
+148 −71 stablehlo/dialect/StablehloOps.td
+435 −191 stablehlo/dialect/TypeInference.cpp
+7 −0 stablehlo/dialect/TypeInference.h
+1 −1 stablehlo/dialect/Version.h
+15 −15 stablehlo/dialect/VhloBytecode.cpp
+5 −5 stablehlo/dialect/VhloOps.cpp
+10 −10 stablehlo/dialect/VhloTypes.cpp
+5 −4 stablehlo/integrations/c/ChloAttributes.cpp
+67 −106 stablehlo/integrations/c/StablehloAttributes.cpp
+1 −1 stablehlo/integrations/c/StablehloTypes.cpp
+1 −1 stablehlo/integrations/python/StablehloModule.cpp
+3 −3 stablehlo/reference/Api.cpp
+15 −17 stablehlo/reference/Element.cpp
+2 −2 stablehlo/reference/Index.cpp
+4 −2 stablehlo/reference/Index.h
+7 −7 stablehlo/reference/InterpreterOps.cpp
+1 −1 stablehlo/reference/NumPy.cpp
+286 −7 stablehlo/reference/Ops.cpp
+10 −0 stablehlo/reference/Ops.h
+11 −11 stablehlo/reference/Tensor.cpp
+2 −2 stablehlo/reference/Types.cpp
+2 −0 stablehlo/tests/BUILD.bazel
+2 −2 stablehlo/tests/CheckOps.cpp
+60 −0 stablehlo/tests/TestUtils.cpp
+11 −0 stablehlo/tests/TestUtils.td
+438 −440 stablehlo/tests/chlo/chlo_legalize_to_stablehlo.mlir
+2 −1 stablehlo/tests/infer_stablehlo.mlir
+79 −0 stablehlo/tests/interpret/convolution.mlir
+2 −2 stablehlo/tests/interpret/tanh.mlir
+0 −55 stablehlo/tests/ops_chlo.mlir
+0 −18 stablehlo/tests/ops_chlo_roundtrip.mlir
+1,239 −0 stablehlo/tests/ops_speculatability.mlir
+48 −24 stablehlo/tests/ops_stablehlo.mlir
+153 −7 stablehlo/tests/ops_stablehlo_quantized.mlir
+1 −2 stablehlo/tests/print_types_invalid.mlir
+456 −0 stablehlo/tests/stablehlo_aggressive_simplification.mlir
+8 −8 stablehlo/tests/stablehlo_canonicalize_dynamism.mlir
+1 −1 stablehlo/tests/stablehlo_refine_shapes.mlir
+ stablehlo/tests/vhlo/stablehlo_legalize_to_vhlo.0_10_0.mlir.bc
+ stablehlo/tests/vhlo/stablehlo_legalize_to_vhlo.0_11_0.mlir.bc
+ stablehlo/tests/vhlo/stablehlo_legalize_to_vhlo.0_12_0.mlir.bc
+ stablehlo/tests/vhlo/stablehlo_legalize_to_vhlo.0_13_0.mlir.bc
+ stablehlo/tests/vhlo/stablehlo_legalize_to_vhlo.0_14_0.mlir.bc
+ stablehlo/tests/vhlo/stablehlo_legalize_to_vhlo.0_15_0.mlir.bc
+ stablehlo/tests/vhlo/stablehlo_legalize_to_vhlo.0_16_0.mlir.bc
+ stablehlo/tests/vhlo/stablehlo_legalize_to_vhlo.0_17_0.mlir.bc
+ stablehlo/tests/vhlo/stablehlo_legalize_to_vhlo.0_18_0.mlir.bc
+ stablehlo/tests/vhlo/stablehlo_legalize_to_vhlo.0_19_0.mlir.bc
+ stablehlo/tests/vhlo/stablehlo_legalize_to_vhlo.0_9_0.mlir.bc
+1 −1 stablehlo/tools/StablehloTranslateMain.cpp
+103 −105 stablehlo/transforms/ChloLegalizeToStablehlo.cpp
+13 −13 stablehlo/transforms/ShapeLegalizeToStablehlo.cpp
+123 −9 stablehlo/transforms/StablehloAggressiveSimplification.cpp
+2 −2 stablehlo/transforms/StablehloCanonicalizeDynamism.cpp
+2 −2 stablehlo/transforms/StablehloInstrumentWithProbe.cpp
+40 −47 stablehlo/transforms/StablehloLegalizeToVhlo.cpp
+4 −4 stablehlo/transforms/StablehloRefineArguments.cpp
+8 −8 stablehlo/transforms/StablehloRefineShapes.cpp
+90 −83 stablehlo/transforms/VhloLegalizeToStablehlo.cpp
+12 −12 stablehlo/transforms/VhloToVersion.cpp
2 changes: 1 addition & 1 deletion utils/clone-mlir.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
git clone -n https://github.com/llvm/llvm-project.git
# Check out a specific branch that is known to work with ONNX-MLIR.
cd llvm-project && git checkout 7ac7d418ac2b16fd44789dcf48e2b5d73de3e715 && cd ..
cd llvm-project && git checkout 1e6ce5e284f5c0e8d64eee21af727bb164eb3caf && cd ..
Loading