Merge pull request #7793 from NatashaKnk:main-to-google
PiperOrigin-RevId: 413527353
diff --git a/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py b/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py
index 53f14ae..1c23aa7 100644
--- a/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py
+++ b/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py
@@ -13,51 +13,67 @@
"//build_tools:dl": ["${CMAKE_DL_LIBS}"],
# IREE llvm-external-projects
- "//llvm-external-projects/iree-dialects:IREEInputDialect": [
- "IREEInputDialect"
- ],
- "//llvm-external-projects/iree-dialects:IREELinalgExtDialect": [
- "IREELinalgExtDialect"
- ],
- "//llvm-external-projects/iree-dialects:IREELinalgExtTransforms": [
- "IREELinalgExtPasses"
- ],
+ "//llvm-external-projects/iree-dialects:IREEInputDialect":
+ ["IREEInputDialect"],
+ "//llvm-external-projects/iree-dialects:IREELinalgExtDialect":
+ ["IREELinalgExtDialect"],
+ "//llvm-external-projects/iree-dialects:IREELinalgExtTransforms":
+ ["IREELinalgExtPasses"],
"//llvm-external-projects/iree-dialects:IREEPyDMDialect": [
"IREEPyDMDialect"
],
- "//llvm-external-projects/iree-dialects:IREEPyDMTransforms": [
- "IREEPyDMPasses"
- ],
+ "//llvm-external-projects/iree-dialects:IREEPyDMTransforms":
+ ["IREEPyDMPasses"],
# LLVM
"@llvm-project//llvm:IPO": ["LLVMipo"],
"@llvm-project//lld": ["lld"],
# MLIR
- "@llvm-project//mlir:AllPassesAndDialects": ["MLIRAllDialects"],
- "@llvm-project//mlir:AffineToStandardTransforms": ["MLIRAffineToStandard"],
+ "@llvm-project//mlir:AllPassesAndDialects": [
+ "MLIRAllDialects"
+ ],
+ "@llvm-project//mlir:AffineToStandardTransforms": [
+ "MLIRAffineToStandard"
+ ],
"@llvm-project//mlir:CFGTransforms": ["MLIRSCFToStandard"],
"@llvm-project//mlir:ComplexDialect": ["MLIRComplex"],
"@llvm-project//mlir:DialectUtils": [""],
- "@llvm-project//mlir:ExecutionEngineUtils": ["MLIRExecutionEngine"],
+ "@llvm-project//mlir:ExecutionEngineUtils": [
+ "MLIRExecutionEngine"
+ ],
"@llvm-project//mlir:GPUDialect": ["MLIRGPUOps"],
"@llvm-project//mlir:GPUTransforms": ["MLIRGPUTransforms"],
"@llvm-project//mlir:LinalgInterfaces": ["MLIRLinalg"],
"@llvm-project//mlir:LinalgOps": ["MLIRLinalg"],
"@llvm-project//mlir:LLVMDialect": ["MLIRLLVMIR"],
- "@llvm-project//mlir:LLVMTransforms": ["MLIRStandardToLLVM"],
+ "@llvm-project//mlir:LLVMTransforms": [
+ "MLIRStandardToLLVM"
+ ],
"@llvm-project//mlir:MathDialect": ["MLIRMath"],
- "@llvm-project//mlir:ArithmeticDialect": ["MLIRArithmetic"],
- "@llvm-project//mlir:BufferizationDialect": ["MLIRBufferization"],
+ "@llvm-project//mlir:ArithmeticDialect": [
+ "MLIRArithmetic"
+ ],
+ "@llvm-project//mlir:BufferizationDialect": [
+ "MLIRBufferization"
+ ],
"@llvm-project//mlir:MemRefDialect": ["MLIRMemRef"],
"@llvm-project//mlir:SCFToGPUPass": ["MLIRSCFToGPU"],
"@llvm-project//mlir:SCFDialect": ["MLIRSCF"],
"@llvm-project//mlir:StandardOps": ["MLIRStandard"],
- "@llvm-project//mlir:ShapeTransforms": ["MLIRShapeOpsTransforms"],
- "@llvm-project//mlir:SideEffects": ["MLIRSideEffectInterfaces"],
+ "@llvm-project//mlir:ShapeTransforms": [
+ "MLIRShapeOpsTransforms"
+ ],
+ "@llvm-project//mlir:SideEffects": [
+ "MLIRSideEffectInterfaces"
+ ],
"@llvm-project//mlir:SPIRVDialect": ["MLIRSPIRV"],
"@llvm-project//mlir:TosaDialect": ["MLIRTosa"],
- "@llvm-project//mlir:ToLLVMIRTranslation": ["MLIRTargetLLVMIRExport"],
- "@llvm-project//mlir:mlir_c_runner_utils": ["MLIRExecutionEngine"],
+ "@llvm-project//mlir:ToLLVMIRTranslation": [
+ "MLIRTargetLLVMIRExport"
+ ],
+ "@llvm-project//mlir:mlir_c_runner_utils": [
+ "MLIRExecutionEngine"
+ ],
"@llvm-project//mlir:mlir-translate": ["mlir-translate"],
"@llvm-project//mlir:MlirTableGenMain": ["MLIRTableGen"],
"@llvm-project//mlir:MlirOptLib": ["MLIROptLib"],
@@ -84,14 +100,16 @@
"tensorflow::external_mhlo_includes",
"MhloToStandard",
],
- "@mlir-hlo//:legalize_einsum_to_dot_general": [
- "tensorflow::external_mhlo_includes",
- "MhloPasses",
- ],
- "@mlir-hlo//:legalize_gather_to_torch_index_select": [
- "tensorflow::external_mhlo_includes",
- "MhloPasses",
- ],
+ "@mlir-hlo//:legalize_einsum_to_dot_general":
+ [
+ "tensorflow::external_mhlo_includes",
+ "MhloPasses",
+ ],
+ "@mlir-hlo//:legalize_gather_to_torch_index_select":
+ [
+ "tensorflow::external_mhlo_includes",
+ "MhloPasses",
+ ],
"@mlir-hlo//:legalize_to_linalg": [
"tensorflow::external_mhlo_includes",
"MhloLhloToLinalg",
@@ -117,10 +135,11 @@
"tensorflow::external_mhlo_includes",
"MhloToStandard",
],
- "@mlir-hlo//:mhlo_to_mhlo_lowering_patterns": [
- "tensorflow::external_mhlo_includes",
- "MhloPasses",
- ],
+ "@mlir-hlo//:mhlo_to_mhlo_lowering_patterns":
+ [
+ "tensorflow::external_mhlo_includes",
+ "MhloPasses",
+ ],
"@mlir-hlo//:unfuse_batch_norm": [
"tensorflow::external_mhlo_includes",
"MhloPasses",
@@ -141,7 +160,8 @@
"@com_google_googletest//:gtest": ["gmock", "gtest"],
"@spirv_cross//:spirv_cross_lib": ["spirv-cross-msl"],
"@cpuinfo": ["cpuinfo"],
- "@vulkan_memory_allocator//:impl_header_only": ["vulkan_memory_allocator"],
+ "@vulkan_memory_allocator//:impl_header_only":
+ ["vulkan_memory_allocator"],
}
diff --git a/docs/website/docs/deployment-configurations/bare-metal.md b/docs/website/docs/deployment-configurations/bare-metal.md
index cf88bf7..945a983 100644
--- a/docs/website/docs/deployment-configurations/bare-metal.md
+++ b/docs/website/docs/deployment-configurations/bare-metal.md
@@ -27,7 +27,7 @@
The model can be compiled with the following command from the IREE compiler
build directory
-``` shell hl_lines="3 4 5"
+```shell
iree/tools/iree-translate \
-iree-mlir-to-vm-bytecode-module \
-iree-stream-partitioning-favor=min-peak-memory \
@@ -41,15 +41,15 @@
In which
-* `-iree-stream-partitioning-favor=min-peak-memory`: Optimize for minimum peak
-memory usage at the cost of concurrency - include when targeting single-threaded
-execution to reduce memory consumption.
-* `iree-hal-target-backends=dylib-llvm-aot`: Build the model for the dynamic
-library CPU HAL driver
-* `iree-llvm-target-triple`: Use the `<arch>-pc-linux-elf` LLVM target triple so
-the artifact has a fixed ABI to be rendered by the
-[elf_module library](https://github.com/google/iree/tree/main/iree/hal/local/elf)
-* `iree-llvm-debug-symbols=false`: To reduce the artifact size
+* `-iree-stream-partitioning-favor=min-peak-memory`: Optimize for minimum peak
+ memory usage at the cost of concurrency - include when targeting
+ single-threaded execution to reduce memory consumption.
+* `iree-hal-target-backends=dylib-llvm-aot`: Build the model for the dynamic
+ library CPU HAL driver
+* `iree-llvm-target-triple`: Use the `<arch>-pc-linux-elf` LLVM target triple
+ so the artifact has a fixed ABI to be rendered by the
+ [elf_module library](https://github.com/google/iree/tree/main/iree/hal/local/elf)
+* `iree-llvm-debug-symbols=false`: To reduce the artifact size
See [generate.sh](https://github.com/google/iree/blob/main/iree/hal/local/elf/testdata/generate.sh)
for example command-line instructions of some common architectures