Skip to content

Commit

Permalink
Update llvm-project to llvm/llvm-project@af20aff35ec3 (#3032)
Browse files Browse the repository at this point in the history
Co-authored-by: Megan Hampton <[email protected]>
  • Loading branch information
hamptonm1 and MegoHam21 authored Dec 20, 2024
1 parent b800036 commit f6d0806
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
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 01d233ff403823389f8480897e41aea84ecbb3d3 && cd ..
cd llvm-project && git checkout af20aff35ec37ead88903bc3e44f6a81c5c9ca4e && 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 01d233ff403823389f8480897e41aea84ecbb3d3 && cd ..
cd llvm-project && git checkout af20aff35ec37ead88903bc3e44f6a81c5c9ca4e && cd ..
```

[same-as-file]: <> (utils/build-mlir.cmd)
Expand Down
30 changes: 17 additions & 13 deletions test/mlir/conversion/onnx_to_stablehlo/Tensor/GatherElements.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@
func.func @main_gather_elements(%arg0: tensor<3x2xf32>, %arg1: tensor<2x2xi64>) -> tensor<2x2xf32> {
%0 = "onnx.GatherElements"(%arg0, %arg1) {axis = 0 : si64} : (tensor<3x2xf32>, tensor<2x2xi64>) -> tensor<2x2xf32>
return %0 : tensor<2x2xf32>
// CHECK: func.func @main_gather_elements([[PARAM_0_:%.+]]: tensor<3x2xf32>, [[PARAM_1_:%.+]]: tensor<2x2xi64>) -> tensor<2x2xf32> {
// CHECK-DAG: [[CST_:%.+]] = arith.constant dense<[2, 2, 1]> : tensor<3xindex>
// CHECK-DAG: [[VAR_0_:%.+]] = stablehlo.constant dense<3> : tensor<i64>
// CHECK-DAG: [[VAR_1_:%.+]] = stablehlo.constant dense<0> : tensor<2x2xi64>
// CHECK-DAG: [[VAR_2_:%.+]] = stablehlo.broadcast_in_dim [[VAR_0_]], dims = [] : (tensor<i64>) -> tensor<2x2xi64>
// CHECK-DAG: [[VAR_3_:%.+]] = stablehlo.compare LT, [[PARAM_1_]], [[VAR_1_]] : (tensor<2x2xi64>, tensor<2x2xi64>) -> tensor<2x2xi1>
// CHECK-DAG: [[VAR_4_:%.+]] = stablehlo.add [[PARAM_1_]], [[VAR_2_]] : tensor<2x2xi64>
// CHECK-NEXT: [[VAR_5_:%.+]] = stablehlo.select [[VAR_3_]], [[VAR_4_]], [[PARAM_1_]] : tensor<2x2xi1>, 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: return [[VAR_9_]] : tensor<2x2xf32>
// mlir2FileCheck.py
// CHECK-LABEL: func.func @main_gather_elements
// CHECK-SAME: ([[PARAM_0_:%.+]]: tensor<3x2xf32>, [[PARAM_1_:%.+]]: tensor<2x2xi64>) -> tensor<2x2xf32> {
// CHECK-DAG: [[VAR_cst_:%.+]] = arith.constant dense<[2, 2, 1]> : tensor<3xindex>
// CHECK-DAG: [[VAR_c_:%.+]] = stablehlo.constant dense<3> : tensor<i64>
// CHECK-DAG: [[VAR_c_0_:%.+]] = stablehlo.constant dense<0> : tensor<2x2xi64>
// CHECK-NOT: separator of consecutive DAGs
// CHECK-DAG: [[VAR_0_:%.+]] = stablehlo.broadcast_in_dim [[VAR_c_]], dims = [] : (tensor<i64>) -> tensor<2x2xi64>
// CHECK-DAG: [[VAR_1_:%.+]] = stablehlo.compare LT, [[PARAM_1_]], [[VAR_c_0_]] : (tensor<2x2xi64>, tensor<2x2xi64>) -> tensor<2x2xi1>
// CHECK: [[VAR_2_:%.+]] = stablehlo.add [[PARAM_1_]], [[VAR_0_]] : tensor<2x2xi64>
// CHECK: [[VAR_3_:%.+]] = stablehlo.select [[VAR_1_]], [[VAR_2_]], [[PARAM_1_]] : tensor<2x2xi1>, tensor<2x2xi64>
// CHECK-DAG: [[VAR_4_:%.+]] = stablehlo.dynamic_reshape [[VAR_3_]], [[VAR_cst_]] : (tensor<2x2xi64>, tensor<3xindex>) -> tensor<2x2x1xi64>
// CHECK-DAG: [[VAR_5_:%.+]] = stablehlo.dynamic_iota [[VAR_cst_]], dim = 1 : (tensor<3xindex>) -> tensor<2x2x1xi64>
// CHECK: [[VAR_6_:%.+]] = stablehlo.concatenate [[VAR_4_]], [[VAR_5_]], dim = 2 : (tensor<2x2x1xi64>, tensor<2x2x1xi64>) -> tensor<2x2x2xi64>
// CHECK: [[VAR_7_:%.+]] = "stablehlo.gather"([[PARAM_0_]], [[VAR_6_]]) <{dimension_numbers = #stablehlo.gather<collapsed_slice_dims = [0, 1], start_index_map = [0, 1], index_vector_dim = 2>, slice_sizes = array<i64: 1, 1>}> : (tensor<3x2xf32>, tensor<2x2x2xi64>) -> tensor<2x2xf32>
// CHECK: return [[VAR_7_]] : tensor<2x2xf32>
// CHECK: }
}
2 changes: 1 addition & 1 deletion third_party/stablehlo
Submodule stablehlo updated 64 files
+46 −0 .github/workflows/execute_tutorials.yml
+4 −0 BUILD.bazel
+2 −2 WORKSPACE.bazel
+87 −0 build_tools/integrate/README.md
+55 −0 build_tools/integrate/llvm_bump_revision.sh
+216 −0 build_tools/integrate/stablehlo_tag_and_bump_version.sh
+1 −1 build_tools/llvm_version.txt
+1 −1 build_tools/math/README.md
+6 −2 build_tools/math/generate_ChloDecompositionPatternsMath.py
+1 −0 build_tools/math/generate_tests.py
+0 −124 build_tools/update_version_h_cpp.sh
+36 −17 docs/generated/stablehlo_passes.md
+0 −9 docs/interpreter_status.md
+48 −93 docs/roadmap.md
+246 −245 docs/tutorials/savedmodel-embed.ipynb
+103 −0 rfcs/20241015-result-accuracy.md
+1 −0 stablehlo/dialect/ChloOps.cpp
+14 −0 stablehlo/dialect/ChloOps.td
+36 −0 stablehlo/dialect/Serialization.cpp
+12 −0 stablehlo/dialect/Serialization.h
+24 −4 stablehlo/dialect/TypeInference.cpp
+23 −0 stablehlo/dialect/TypeInference.h
+2 −2 stablehlo/dialect/Version.cpp
+1 −1 stablehlo/dialect/Version.h
+0 −3 stablehlo/dialect/VhloTypes.td
+5 −1 stablehlo/integrations/c/StablehloPasses.cpp
+265 −227 stablehlo/tests/chlo/chlo_legalize_to_stablehlo.mlir
+1 −1 stablehlo/tests/math/acos_float64.mlir
+1 −1 stablehlo/tests/math/acosh_complex128.mlir
+1 −1 stablehlo/tests/math/acosh_complex64.mlir
+2 −2 stablehlo/tests/math/acosh_float64.mlir
+1 −1 stablehlo/tests/math/asin_complex128.mlir
+1 −1 stablehlo/tests/math/asin_complex64.mlir
+2 −2 stablehlo/tests/math/asin_float64.mlir
+1 −1 stablehlo/tests/math/asinh_complex128.mlir
+1 −1 stablehlo/tests/math/asinh_complex64.mlir
+2 −2 stablehlo/tests/math/asinh_float64.mlir
+1 −1 stablehlo/tests/math/atan_complex128.mlir
+1 −1 stablehlo/tests/math/atan_complex64.mlir
+2 −2 stablehlo/tests/math/atan_float64.mlir
+1 −1 stablehlo/tests/math/atanh_complex128.mlir
+1 −1 stablehlo/tests/math/atanh_complex64.mlir
+2 −2 stablehlo/tests/math/atanh_float64.mlir
+19 −0 stablehlo/tests/math/square_complex128.mlir
+19 −0 stablehlo/tests/math/square_complex64.mlir
+19 −0 stablehlo/tests/math/square_float32.mlir
+19 −0 stablehlo/tests/math/square_float64.mlir
+2 −2 stablehlo/tests/print_types_invalid.mlir
+38 −0 stablehlo/tests/transforms/stablehlo_aggressive_simplification.mlir
+2 −2 stablehlo/tests/transforms/stablehlo_convert_to_signless.mlir
+11 −4 stablehlo/tests/transforms/stablehlo_refine_parameters.mlir
+299 −6 stablehlo/tests/transforms/stablehlo_refine_shapes.mlir
+19 −0 stablehlo/tests/vhlo/vhlo_emit_version_api.1_1_0.mlir
+ stablehlo/tests/vhlo/vhlo_emit_version_api.1_1_0.mlir.bc
+18 −0 stablehlo/tools/StablehloTranslateMain.cpp
+59 −27 stablehlo/transforms/ChloDecompositionPatternsMath.td
+36 −0 stablehlo/transforms/ChloDecompositionUtils.h
+46 −35 stablehlo/transforms/ChloLegalizeToStablehlo.cpp
+20 −0 stablehlo/transforms/Passes.td
+3 −2 stablehlo/transforms/StablehloAggressiveFolder.cpp
+12 −2 stablehlo/transforms/StablehloAggressiveSimplificationPatterns.td
+24 −10 stablehlo/transforms/StablehloRefineArguments.cpp
+412 −42 stablehlo/transforms/StablehloRefineShapes.cpp
+17 −1 stablehlo/transforms/StablehloRefineShapes.h
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 01d233ff403823389f8480897e41aea84ecbb3d3 && cd ..
cd llvm-project && git checkout af20aff35ec37ead88903bc3e44f6a81c5c9ca4e && cd ..

0 comments on commit f6d0806

Please sign in to comment.