From aec42548c841751887a5ec26226261f17c38f55b Mon Sep 17 00:00:00 2001 From: Jakub Kuderski Date: Wed, 31 May 2023 21:40:09 -0400 Subject: [PATCH] Deprecate MHLO input conversion pipeline (#13870) As we continue the migration to the stablehlo input conversion pipeline, mark the mhlo pipeline as deprecated and rename the option to `--iree-input-type=mhlo_legacy`. This was proposed and announced in the following RFC: https://groups.google.com/g/iree-discuss/c/s6dBpDtWhtk. Users are encouraged to try the new pipeline: `--iree-input-type=stablehlo` and report any issues or missing features, as we plan to drop the legacy mhlo pipeline in a few weeks. Update tests to use the new flag name. Update documents to suggest either the new pipeline or the new flag. Next, we will have to migrate existing test and samples to use StableHLO as the input format: https://github.com/openxla/iree/issues/13869. Issue: https://github.com/openxla/iree/issues/12678 --- build_tools/cmake/iree_static_linker_test.cmake | 2 +- .../c/iree/compiler/loader/loader_test.c | 2 +- .../bindings/python/iree/compiler/tools/core.py | 16 ++++++++++++---- .../bindings/python/iree/compiler/tools/tf.py | 2 +- .../python/test/tools/compiler_core_test.py | 4 ++-- compiler/src/iree/compiler/Pipelines/Options.cpp | 14 +++++++------- compiler/src/iree/compiler/Pipelines/Options.h | 10 +++++----- .../src/iree/compiler/Pipelines/Pipelines.cpp | 12 ++++++------ .../debugging/compile_time_regressions.md | 2 +- .../debugging/tf_integrations_test_repro.md | 2 +- docs/developers/developing_iree/benchmarking.md | 2 +- .../developing_iree/developer_overview.md | 2 +- .../developing_iree/profiling_vulkan_gpu.md | 12 ++++++------ .../docs/deployment-configurations/cpu.md | 2 +- .../deployment-configurations/gpu-cuda-rocm.md | 4 ++-- .../docs/deployment-configurations/gpu-vulkan.md | 2 +- experimental/web/sample_dynamic/build_sample.sh | 2 +- experimental/web/sample_static/build_sample.sh | 2 +- .../hal/local/executable_library_benchmark.md | 2 +- samples/dynamic_shapes/README.md | 2 +- samples/dynamic_shapes/test.sh | 2 +- samples/variables_and_state/README.md | 2 +- samples/vision_inference/README.md | 2 +- tests/e2e/models/BUILD.bazel | 6 +++--- tests/e2e/models/CMakeLists.txt | 10 +++++----- tests/e2e/models/collatz.mlir | 4 ++-- tests/e2e/models/edge_detection.mlir | 6 +++--- tests/e2e/models/fragment_000.mlir | 6 +++--- tests/e2e/models/fullyconnected.mlir | 4 ++-- tests/e2e/models/mnist_fake_weights.mlir | 6 +++--- .../models/mnist_train_test/mnist_train_test.py | 2 +- tests/e2e/models/resnet50_fake_weights.mlir | 4 ++-- tests/e2e/models/unidirectional_lstm.mlir | 6 +++--- tests/e2e/regression/BUILD.bazel | 8 ++++---- tests/e2e/regression/CMakeLists.txt | 8 ++++---- tests/e2e/regression/globals_ml_program.mlir | 4 ++-- tests/e2e/regression/trace_dispatch_tensors.mlir | 2 +- tests/e2e/vulkan_specific/BUILD.bazel | 6 +++--- tests/e2e/vulkan_specific/CMakeLists.txt | 6 +++--- tests/e2e/xla_ops/BUILD.bazel | 12 ++++++------ tests/e2e/xla_ops/CMakeLists.txt | 14 +++++++------- tests/microbenchmarks/CMakeLists.txt | 4 ++-- 42 files changed, 115 insertions(+), 107 deletions(-) diff --git a/build_tools/cmake/iree_static_linker_test.cmake b/build_tools/cmake/iree_static_linker_test.cmake index c7a88f882c8a..5db08d457cd2 100644 --- a/build_tools/cmake/iree_static_linker_test.cmake +++ b/build_tools/cmake/iree_static_linker_test.cmake @@ -40,7 +40,7 @@ # FUNCTION_INPUTS # "1x128x128xf32" # COMPILER_FLAGS -# "--iree-input-type=mhlo" +# "--iree-input-type=stablehlo" # ) function(iree_static_linker_test) if(NOT IREE_BUILD_TESTS) diff --git a/compiler/bindings/c/iree/compiler/loader/loader_test.c b/compiler/bindings/c/iree/compiler/loader/loader_test.c index 7f8accf06106..5145e29d4451 100644 --- a/compiler/bindings/c/iree/compiler/loader/loader_test.c +++ b/compiler/bindings/c/iree/compiler/loader/loader_test.c @@ -34,7 +34,7 @@ static bool manipulateFlags(iree_compiler_session_t *session) { printf("FLAG GET ERROR. Abort\n"); return 1; } - const char *flag1 = "--iree-input-type=mhlo"; + const char *flag1 = "--iree-input-type=stablehlo"; const char *badFlag1 = "--iree-non-existing-flag=foobar"; const char *flagArgv[] = { flag1, diff --git a/compiler/bindings/python/iree/compiler/tools/core.py b/compiler/bindings/python/iree/compiler/tools/core.py index 11e321d88f3e..858716a05842 100644 --- a/compiler/bindings/python/iree/compiler/tools/core.py +++ b/compiler/bindings/python/iree/compiler/tools/core.py @@ -41,10 +41,12 @@ class InputType(Enum): `CompilerOptions.input_type`. """ NONE = "none" - MHLO = "mhlo" + STABLEHLO = "stablehlo" + STABLEHLO_XLA = "stablehlo_xla" TOSA = "tosa" TM_TENSOR = "tm_tensor" - XLA = "xla" + MHLO_LEGACY = "mhlo_legacy" + XLA_LEGACY = "xla_legacy" @staticmethod def parse(spec: Union[str, InputType]) -> InputType: @@ -64,6 +66,9 @@ def parse(spec: Union[str, InputType]) -> InputType: f"{', '.join(InputType.__members__.keys())}") return InputType[spec] + def __str__(self): + return self.value + class OutputFormat(Enum): """The output format of the compiler.""" @@ -89,6 +94,9 @@ def parse(spec: Union[str, OutputFormat]) -> OutputFormat: f"{', '.join(OutputFormat.__members__.keys())}") return OutputFormat[spec] + def __str__(self): + return self.value + @dataclass class CompilerOptions: @@ -167,8 +175,8 @@ def build_compile_command_line(input_file: str, tfs: TempFileSaver, cl = [ iree_compile, input_file, - f"--iree-input-type={options.input_type.value}", - f"--iree-vm-bytecode-module-output-format={options.output_format.value}", + f"--iree-input-type={options.input_type!s}", + f"--iree-vm-bytecode-module-output-format={options.output_format!s}", ] for target_backend in options.target_backends: cl.append(f"--iree-hal-target-backends={target_backend}") diff --git a/compiler/bindings/python/iree/compiler/tools/tf.py b/compiler/bindings/python/iree/compiler/tools/tf.py index 6a49e3172eeb..f3b957dd0c10 100644 --- a/compiler/bindings/python/iree/compiler/tools/tf.py +++ b/compiler/bindings/python/iree/compiler/tools/tf.py @@ -97,7 +97,7 @@ class ImportOptions(CompilerOptions): exported_names: Sequence[str] = () import_only: bool = False import_type: ImportType = ImportType.OBJECT_GRAPH - input_type: Union[InputType, str] = InputType.XLA + input_type: Union[InputType, str] = InputType.XLA_LEGACY saved_model_tags: Set[str] = field(default_factory=set) save_temp_iree_input: Optional[str] = None diff --git a/compiler/bindings/python/test/tools/compiler_core_test.py b/compiler/bindings/python/test/tools/compiler_core_test.py index 162d9ffe368e..c017deb41985 100644 --- a/compiler/bindings/python/test/tools/compiler_core_test.py +++ b/compiler/bindings/python/test/tools/compiler_core_test.py @@ -105,7 +105,7 @@ def testOutputFbText(self): def testBadInputType(self): with self.assertRaisesRegex( ValueError, "For input_type= argument, expected one of: " - "NONE, MHLO, TOSA"): + "NONE, STABLEHLO, STABLEHLO_XLA, TOSA"): _ = iree.compiler.tools.compile_str( SIMPLE_MUL_ASM, input_type="not-existing", @@ -124,7 +124,7 @@ def testBadOutputFormat(self): def testOutputFbTextParsed(self): text = iree.compiler.tools.compile_str( SIMPLE_MUL_ASM, - input_type='mhlo', + input_type='stablehlo', output_format='flatbuffer_text', target_backends=iree.compiler.tools.DEFAULT_TESTING_BACKENDS).decode( "utf-8") diff --git a/compiler/src/iree/compiler/Pipelines/Options.cpp b/compiler/src/iree/compiler/Pipelines/Options.cpp index a64ca9f6f2a6..5e0c30909500 100644 --- a/compiler/src/iree/compiler/Pipelines/Options.cpp +++ b/compiler/src/iree/compiler/Pipelines/Options.cpp @@ -45,17 +45,17 @@ void InputDialectOptions::bindOptions(OptionsBinder &binder) { "Analyze the input program to choose conversion.") // clang-format off #ifdef IREE_HAVE_MHLO_INPUT - , clEnumValN(InputDialectOptions::Type::mhlo, "mhlo", - "Legalize from MHLO ops.") - , clEnumValN(InputDialectOptions::Type::xla, "xla", - "Legalize from MHLO ops (with XLA cleanup preprocessing).") , clEnumValN(InputDialectOptions::Type::stablehlo, "stablehlo", - "Legalize from StableHLO ops. WARNING: This is work in progress.") + "Legalize from StableHLO ops.") , clEnumValN(InputDialectOptions::Type::stablehlo_xla, "stablehlo_xla", - "Legalize from StableHLO ops (with XLA cleanup preprocessing). " - "WARNING: This is work in progress.") + "Legalize from StableHLO ops (with XLA cleanup preprocessing). ") + , clEnumValN(InputDialectOptions::Type::mhlo_legacy, "mhlo_legacy", + "Legalize from MHLO ops. (Deprecated.)") + , clEnumValN(InputDialectOptions::Type::xla_legacy, "xla_legacy", + "Legalize from MHLO ops (with XLA cleanup preprocessing). " + "(Deprecated.)") #endif // IREE_HAVE_MHLO_INPUT #ifdef IREE_HAVE_TORCH_INPUT , clEnumValN(InputDialectOptions::Type::tm_tensor, "tm_tensor", diff --git a/compiler/src/iree/compiler/Pipelines/Options.h b/compiler/src/iree/compiler/Pipelines/Options.h index e334610986f3..50052407c4ed 100644 --- a/compiler/src/iree/compiler/Pipelines/Options.h +++ b/compiler/src/iree/compiler/Pipelines/Options.h @@ -37,16 +37,16 @@ struct InputDialectOptions { // Analyses the input to determine what input dialect pipeline to use. auto_detect, #ifdef IREE_HAVE_MHLO_INPUT - // Legalizes input defined over MHLO ops. - mhlo, - // Special case of 'mhlo' legalization which also performs some XLA - // cleanup activities. - xla, // Legalizes input defined over StableHLO ops. stablehlo, // Special case of 'stablehlo' legalization which also performs some XLA // preprocessing, e.g., flattening of tuples. stablehlo_xla, + // Legalizes input defined over MHLO ops. (Deprecated.) + mhlo_legacy, + // Special case of 'mhlo' legalization which also performs some XLA + // cleanup activities. (Deprecated.) + xla_legacy, #endif // IREE_HAVE_MHLO_INPUT #ifdef IREE_HAVE_TORCH_INPUT // Legalizes input defined over TMTensor ops. diff --git a/compiler/src/iree/compiler/Pipelines/Pipelines.cpp b/compiler/src/iree/compiler/Pipelines/Pipelines.cpp index 888d042eb5d5..a46fedc3d7ae 100644 --- a/compiler/src/iree/compiler/Pipelines/Pipelines.cpp +++ b/compiler/src/iree/compiler/Pipelines/Pipelines.cpp @@ -60,18 +60,18 @@ void buildIREEVMTransformPassPipeline( passManager.addPass(createAutoInputConversionPipelinePass()); break; #ifdef IREE_HAVE_MHLO_INPUT - case InputDialectOptions::Type::mhlo: - MHLO::buildMHLOInputConversionPassPipeline(passManager); - break; - case InputDialectOptions::Type::xla: - MHLO::buildXLAInputConversionPassPipeline(passManager); - break; case InputDialectOptions::Type::stablehlo: stablehlo::buildStableHLOInputConversionPassPipeline(passManager); break; case InputDialectOptions::Type::stablehlo_xla: stablehlo::buildStableHLOXLAInputConversionPassPipeline(passManager); break; + case InputDialectOptions::Type::mhlo_legacy: + MHLO::buildMHLOInputConversionPassPipeline(passManager); + break; + case InputDialectOptions::Type::xla_legacy: + MHLO::buildXLAInputConversionPassPipeline(passManager); + break; #endif // IREE_HAVE_MHLO_INPUT #ifdef IREE_HAVE_TORCH_INPUT case InputDialectOptions::Type::tm_tensor: diff --git a/docs/developers/debugging/compile_time_regressions.md b/docs/developers/debugging/compile_time_regressions.md index 31d318b15d48..f56870ef06a8 100644 --- a/docs/developers/debugging/compile_time_regressions.md +++ b/docs/developers/debugging/compile_time_regressions.md @@ -97,7 +97,7 @@ INPUT_FILE_PATH="/path/to/program.mlirbc" TMP_DIR="../iree-tmp" declare -a COMPILER_FLAGS=( - "--iree-input-type=mhlo" + "--iree-input-type=stablehlo" "--iree-hal-target-backends=cuda" "--iree-hal-cuda-llvm-target-arch=sm_80" ) diff --git a/docs/developers/debugging/tf_integrations_test_repro.md b/docs/developers/debugging/tf_integrations_test_repro.md index c6c2c55059f0..f839124aec45 100644 --- a/docs/developers/debugging/tf_integrations_test_repro.md +++ b/docs/developers/debugging/tf_integrations_test_repro.md @@ -71,6 +71,6 @@ All steps here assume starting from the IREE root directory. ```bash iree-compile \ --iree-hal-target-backends=llvm-cpu \ - --iree-input-type=mhlo \ + --iree-input-type=stablehlo \ iree_input.mlir ``` diff --git a/docs/developers/developing_iree/benchmarking.md b/docs/developers/developing_iree/benchmarking.md index 79fe99708e32..3bd8840f6d17 100644 --- a/docs/developers/developing_iree/benchmarking.md +++ b/docs/developers/developing_iree/benchmarking.md @@ -107,7 +107,7 @@ dispatch functions, generate an IREE module with the ```shell $ build/tools/iree-compile \ - --iree-input-type=mhlo \ + --iree-input-type=stablehlo \ --iree-flow-export-benchmark-funcs \ --iree-hal-target-backends=vmvx \ tests/e2e/models/fullyconnected.mlir \ diff --git a/docs/developers/developing_iree/developer_overview.md b/docs/developers/developing_iree/developer_overview.md index 978495e1349d..6a3afe6c57b9 100644 --- a/docs/developers/developing_iree/developer_overview.md +++ b/docs/developers/developing_iree/developer_overview.md @@ -144,7 +144,7 @@ runner for the IREE [check framework](./testing_guide.md#end-to-end-tests). ```shell $ ../iree-build/tools/iree-compile \ - --iree-input-type=mhlo \ + --iree-input-type=stablehlo \ --iree-hal-target-backends=vmvx \ $PWD/tests/e2e/xla_ops/abs.mlir \ -o /tmp/abs.vmfb diff --git a/docs/developers/developing_iree/profiling_vulkan_gpu.md b/docs/developers/developing_iree/profiling_vulkan_gpu.md index cffdb962c78d..c7c58f962df6 100644 --- a/docs/developers/developing_iree/profiling_vulkan_gpu.md +++ b/docs/developers/developing_iree/profiling_vulkan_gpu.md @@ -50,12 +50,12 @@ IREE core libraries together with a specific VM bytecode invocation into an Android app. The wrapper and its documentation are placed at [`tools/android/run_module_app/`](https://github.com/openxla/iree/tree/main/tools/android/run_module_app). -For example, to package a module compiled from the following `mhlo-dot.mlir` as +For example, to package a module compiled from the following `stablehlo-dot.mlir` as an Android app: ```mlir func @dot(%lhs: tensor<2x4xf32>, %rhs: tensor<4x2xf32>) -> tensor<2x2xf32> { - %0 = "mhlo.dot"(%lhs, %rhs) : (tensor<2x4xf32>, tensor<4x2xf32>) -> tensor<2x2xf32> + %0 = "stablehlo.dot"(%lhs, %rhs) : (tensor<2x4xf32>, tensor<4x2xf32>) -> tensor<2x2xf32> return %0 : tensor<2x2xf32> } ``` @@ -63,16 +63,16 @@ func @dot(%lhs: tensor<2x4xf32>, %rhs: tensor<4x2xf32>) -> tensor<2x2xf32> { ```shell # First compile into a VM bytecode module $ /path/to/iree/build/tools/iree-compile -- \ - --iree-input-type=mhlo \ + --iree-input-type=stablehlo \ --iree-hal-target-backends=vulkan-spirv \ - /path/to/mhlo-dot.mlir \ - -o /tmp/mhlo-dot.vmfb + /path/to/stablehlo-dot.mlir \ + -o /tmp/stablehlo-dot.vmfb # Then package the Android app $ /path/to/iree/source/tools/android/run_module_app/build_apk.sh \ ./build-apk \ --device vulkan \ - --module /tmp/mhlo-dot.vmfb \ + --module /tmp/stablehlo-dot.vmfb \ --function dot \ --input=... ``` diff --git a/docs/website/docs/deployment-configurations/cpu.md b/docs/website/docs/deployment-configurations/cpu.md index 28bf04cafb3e..9703ae03f70d 100644 --- a/docs/website/docs/deployment-configurations/cpu.md +++ b/docs/website/docs/deployment-configurations/cpu.md @@ -95,7 +95,7 @@ import tool): ``` shell hl_lines="2" iree-compile \ --iree-hal-target-backends=llvm-cpu \ - --iree-input-type=mhlo \ + --iree-input-type=stablehlo \ iree_input.mlir -o mobilenet_cpu.vmfb ``` diff --git a/docs/website/docs/deployment-configurations/gpu-cuda-rocm.md b/docs/website/docs/deployment-configurations/gpu-cuda-rocm.md index 8b0a9e86aa26..00b62835ea7b 100644 --- a/docs/website/docs/deployment-configurations/gpu-cuda-rocm.md +++ b/docs/website/docs/deployment-configurations/gpu-cuda-rocm.md @@ -115,7 +115,7 @@ following command: iree-compile \ --iree-hal-target-backends=cuda \ --iree-hal-cuda-llvm-target-arch=<...> \ - --iree-input-type=mhlo \ + --iree-input-type=stablehlo \ iree_input.mlir -o mobilenet-cuda.vmfb ``` @@ -141,7 +141,7 @@ following command: --iree-rocm-target-chip=<...> \ --iree-rocm-link-bc=true \ --iree-rocm-bc-dir=<...> \ - --iree-input-type=mhlo \ + --iree-input-type=stablehlo \ iree_input.mlir -o mobilenet-rocm.vmfb ``` diff --git a/docs/website/docs/deployment-configurations/gpu-vulkan.md b/docs/website/docs/deployment-configurations/gpu-vulkan.md index 0710ea1866a0..80ef120c511b 100644 --- a/docs/website/docs/deployment-configurations/gpu-vulkan.md +++ b/docs/website/docs/deployment-configurations/gpu-vulkan.md @@ -152,7 +152,7 @@ import tool): iree-compile \ --iree-hal-target-backends=vulkan-spirv \ --iree-vulkan-target-triple=<...> \ - --iree-input-type=mhlo \ + --iree-input-type=stablehlo \ iree_input.mlir -o mobilenet-vulkan.vmfb ``` diff --git a/experimental/web/sample_dynamic/build_sample.sh b/experimental/web/sample_dynamic/build_sample.sh index 3f3e6a487448..664b90fd076d 100755 --- a/experimental/web/sample_dynamic/build_sample.sh +++ b/experimental/web/sample_dynamic/build_sample.sh @@ -61,7 +61,7 @@ COMPILE_TOOL="${INSTALL_ROOT}/bin/iree-compile" compile_sample() { echo " Compiling '$1' sample..." "${COMPILE_TOOL}" "$2" \ - --iree-input-type=mhlo \ + --iree-input-type=mhlo_legacy \ --iree-hal-target-backends=llvm-cpu \ --iree-llvmcpu-target-triple=wasm32-unknown-emscripten \ --iree-llvmcpu-target-cpu-features=+atomics,+bulk-memory,+simd128 \ diff --git a/experimental/web/sample_static/build_sample.sh b/experimental/web/sample_static/build_sample.sh index c90db55fec87..d7c9089d8a8b 100755 --- a/experimental/web/sample_static/build_sample.sh +++ b/experimental/web/sample_static/build_sample.sh @@ -63,7 +63,7 @@ INPUT_PATH="${ROOT_DIR}/samples/models/mnist.mlir" echo "=== Compiling MLIR to static library output (.vmfb, .h, .o) ===" "${COMPILE_TOOL}" "${INPUT_PATH}" \ - --iree-input-type=mhlo \ + --iree-input-type=mhlo_legacy \ --iree-hal-target-backends=llvm-cpu \ --iree-llvmcpu-target-triple=wasm32-unknown-unknown \ --iree-llvmcpu-target-cpu-features=+simd128 \ diff --git a/runtime/src/iree/hal/local/executable_library_benchmark.md b/runtime/src/iree/hal/local/executable_library_benchmark.md index 29b0f87d9567..1e7d59ac2cef 100644 --- a/runtime/src/iree/hal/local/executable_library_benchmark.md +++ b/runtime/src/iree/hal/local/executable_library_benchmark.md @@ -114,7 +114,7 @@ inspect the IR to find the proper way to call their kernels. ``` iree-compile \ - --iree-input-type=mhlo \ + --iree-input-type=stablehlo \ iree/samples/simple_embedding/simple_embedding_test.mlir \ -o=module.vmfb \ --iree-hal-target-backends=llvm-cpu \ diff --git a/samples/dynamic_shapes/README.md b/samples/dynamic_shapes/README.md index 2478603eaece..042ae232cef7 100644 --- a/samples/dynamic_shapes/README.md +++ b/samples/dynamic_shapes/README.md @@ -83,7 +83,7 @@ them. ``` ../iree-build/tools/iree-compile \ --iree-hal-target-backends=llvm-cpu \ - --iree-input-type=mhlo \ + --iree-input-type=mhlo_legacy \ dynamic_shapes.mlir -o dynamic_shapes_cpu.vmfb ``` diff --git a/samples/dynamic_shapes/test.sh b/samples/dynamic_shapes/test.sh index 54a416d64ed9..b31ef5a2b0c1 100755 --- a/samples/dynamic_shapes/test.sh +++ b/samples/dynamic_shapes/test.sh @@ -28,7 +28,7 @@ cmake --build ${BUILD_DIR} --target iree-compile -- -k 0 # 3. Compile `dynamic_shapes.mlir` using `iree-compile`. ${BUILD_DIR}/tools/iree-compile \ --iree-hal-target-backends=llvm-cpu \ - --iree-input-type=mhlo \ + --iree-input-type=mhlo_legacy \ ${ARTIFACTS_DIR}/dynamic_shapes.mlir -o ${ARTIFACTS_DIR}/dynamic_shapes_cpu.vmfb # 4. Build the `iree_samples_dynamic_shapes` CMake target. diff --git a/samples/variables_and_state/README.md b/samples/variables_and_state/README.md index 4a6d777966db..76306dbd4e6f 100644 --- a/samples/variables_and_state/README.md +++ b/samples/variables_and_state/README.md @@ -93,7 +93,7 @@ and compile the imported `counter.mlir` file using `iree-compile`: ``` ../iree-build/tools/iree-compile \ --iree-hal-target-backends=llvm-cpu \ - --iree-input-type=mhlo \ + --iree-input-type=stablehlo \ counter.mlir -o counter_cpu.vmfb ``` diff --git a/samples/vision_inference/README.md b/samples/vision_inference/README.md index 132bae056237..5731a28be6e3 100644 --- a/samples/vision_inference/README.md +++ b/samples/vision_inference/README.md @@ -20,7 +20,7 @@ From this directory: # Compile the MNIST program. iree-compile \ ../models/mnist.mlir \ - --iree-input-type=mhlo \ + --iree-input-type=mhlo_legacy \ --iree-hal-target-backends=llvm-cpu \ -o /tmp/mnist_cpu.vmfb diff --git a/tests/e2e/models/BUILD.bazel b/tests/e2e/models/BUILD.bazel index ae755c888336..3acbcb740f75 100644 --- a/tests/e2e/models/BUILD.bazel +++ b/tests/e2e/models/BUILD.bazel @@ -54,7 +54,7 @@ iree_lit_test_suite( iree_check_single_backend_test_suite( name = "check_llvm-cpu_local-task", srcs = CHECK_FRAMEWORK_TESTS, - compiler_flags = ["--iree-input-type=mhlo"], + compiler_flags = ["--iree-input-type=mhlo_legacy"], driver = "local-task", target_backend = "llvm-cpu", ) @@ -71,7 +71,7 @@ iree_check_single_backend_test_suite( name = "check_vulkan-spirv_vulkan", timeout = "long", srcs = CHECK_FRAMEWORK_TESTS, - compiler_flags = ["--iree-input-type=mhlo"], + compiler_flags = ["--iree-input-type=mhlo_legacy"], driver = "vulkan", target_backend = "vulkan-spirv", ) @@ -80,7 +80,7 @@ iree_check_single_backend_test_suite( name = "check_cuda_cuda", timeout = "long", srcs = CHECK_FRAMEWORK_TESTS, - compiler_flags = ["--iree-input-type=mhlo"], + compiler_flags = ["--iree-input-type=mhlo_legacy"], driver = "cuda", tags = [ # CUDA cuInit fails with sanitizer on. diff --git a/tests/e2e/models/CMakeLists.txt b/tests/e2e/models/CMakeLists.txt index 59849023dd26..10fd3c7577b8 100644 --- a/tests/e2e/models/CMakeLists.txt +++ b/tests/e2e/models/CMakeLists.txt @@ -45,7 +45,7 @@ iree_check_single_backend_test_suite( DRIVER "local-task" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" ) iree_check_single_backend_test_suite( @@ -59,7 +59,7 @@ iree_check_single_backend_test_suite( DRIVER "vulkan" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" TIMEOUT 900 ) @@ -75,7 +75,7 @@ iree_check_single_backend_test_suite( DRIVER "cuda" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" LABELS "noasan" "nomsan" @@ -100,7 +100,7 @@ iree_static_linker_test( FUNCTION_INPUTS "1x28x28x1xf32" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" ) iree_static_linker_test( @@ -115,7 +115,7 @@ iree_static_linker_test( FUNCTION_INPUTS "1x28x28x1xf32" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" "--iree-vm-target-index-bits=32" EMITC ) diff --git a/tests/e2e/models/collatz.mlir b/tests/e2e/models/collatz.mlir index cdf0ac45757a..98fa88d4396e 100644 --- a/tests/e2e/models/collatz.mlir +++ b/tests/e2e/models/collatz.mlir @@ -1,5 +1,5 @@ -// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=vmvx %s | FileCheck %s -// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=vulkan-spirv %s | FileCheck %s) +// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=vmvx %s | FileCheck %s +// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=vulkan-spirv %s | FileCheck %s) // CHECK-LABEL: EXEC @collatz func.func @collatz() -> tensor { diff --git a/tests/e2e/models/edge_detection.mlir b/tests/e2e/models/edge_detection.mlir index 7c8d53e374fe..1408e8afe416 100644 --- a/tests/e2e/models/edge_detection.mlir +++ b/tests/e2e/models/edge_detection.mlir @@ -1,6 +1,6 @@ -// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=vmvx %s --input=1x128x128x1xf32 | FileCheck %s -// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=llvm-cpu %s --input=1x128x128x1xf32 | FileCheck %s -// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=vulkan-spirv %s --input=1x128x128x1xf32 | FileCheck %s) +// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=vmvx %s --input=1x128x128x1xf32 | FileCheck %s +// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=llvm-cpu %s --input=1x128x128x1xf32 | FileCheck %s +// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=vulkan-spirv %s --input=1x128x128x1xf32 | FileCheck %s) // Image edge detection module generated by. // https://github.com/openxla/iree/blob/main/samples/colab/edge_detection.ipynb. diff --git a/tests/e2e/models/fragment_000.mlir b/tests/e2e/models/fragment_000.mlir index d8365b752ef0..b0a164bf6f23 100644 --- a/tests/e2e/models/fragment_000.mlir +++ b/tests/e2e/models/fragment_000.mlir @@ -1,6 +1,6 @@ -// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=vmvx %s | FileCheck %s -// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=llvm-cpu %s | FileCheck %s -// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=vulkan-spirv %s | FileCheck %s) +// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=vmvx %s | FileCheck %s +// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=llvm-cpu %s | FileCheck %s +// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=vulkan-spirv %s | FileCheck %s) // CHECK-LABEL: EXEC @entry func.func @entry() -> tensor<5x5xf32> { diff --git a/tests/e2e/models/fullyconnected.mlir b/tests/e2e/models/fullyconnected.mlir index 8a07f0c9ccfd..eae850705b06 100644 --- a/tests/e2e/models/fullyconnected.mlir +++ b/tests/e2e/models/fullyconnected.mlir @@ -1,5 +1,5 @@ -// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=llvm-cpu %s --input=1x5xf32=1,-2,-3,4,-5 --input=1x5x3x1xf32=15,14,13,12,11,10,9,8,7,6,5,4,3,2,1 | FileCheck %s -// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=vulkan-spirv %s --input=1x5xf32=1,-2,-3,4,-5 --input=1x5x3x1xf32=15,14,13,12,11,10,9,8,7,6,5,4,3,2,1 | FileCheck %s) +// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=llvm-cpu %s --input=1x5xf32=1,-2,-3,4,-5 --input=1x5x3x1xf32=15,14,13,12,11,10,9,8,7,6,5,4,3,2,1 | FileCheck %s +// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=vulkan-spirv %s --input=1x5xf32=1,-2,-3,4,-5 --input=1x5x3x1xf32=15,14,13,12,11,10,9,8,7,6,5,4,3,2,1 | FileCheck %s) // CHECK-LABEL: EXEC @main func.func @main(%arg0: tensor<1x5xf32>, %arg1: tensor<1x5x3x1xf32>) -> tensor<5x1x5xf32> { diff --git a/tests/e2e/models/mnist_fake_weights.mlir b/tests/e2e/models/mnist_fake_weights.mlir index 8f91b3251ff1..92407b78b4ea 100644 --- a/tests/e2e/models/mnist_fake_weights.mlir +++ b/tests/e2e/models/mnist_fake_weights.mlir @@ -1,8 +1,8 @@ // MNIST model with placeholder weights, for testing. -// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=vmvx %s --input=1x28x28x1xf32 | FileCheck %s -// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=llvm-cpu %s --input=1x28x28x1xf32 | FileCheck %s -// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=vulkan-spirv %s --input=1x28x28x1xf32 | FileCheck %s) +// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=vmvx %s --input=1x28x28x1xf32 | FileCheck %s +// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=llvm-cpu %s --input=1x28x28x1xf32 | FileCheck %s +// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=vulkan-spirv %s --input=1x28x28x1xf32 | FileCheck %s) module { util.global private @"__iree_flow___sm_node17__model.layer-1.kernel" {noinline} = dense<1.000000e+00> : tensor<784x128xf32> diff --git a/tests/e2e/models/mnist_train_test/mnist_train_test.py b/tests/e2e/models/mnist_train_test/mnist_train_test.py index e153fe0d7ff2..d84c40685b51 100644 --- a/tests/e2e/models/mnist_train_test/mnist_train_test.py +++ b/tests/e2e/models/mnist_train_test/mnist_train_test.py @@ -28,7 +28,7 @@ def build_module(artifacts_dir: str): compile_file(input_file=os.path.join(artifacts_dir, "mnist_train.mlirbc"), output_file=vmfb_file, target_backends=[args.target_backend], - input_type=InputType.MHLO) + input_type=InputType.MHLO_LEGACY) return load_vm_flatbuffer_file(vmfb_file, driver=args.driver) diff --git a/tests/e2e/models/resnet50_fake_weights.mlir b/tests/e2e/models/resnet50_fake_weights.mlir index dc7aecd89068..4ccd43c0abec 100644 --- a/tests/e2e/models/resnet50_fake_weights.mlir +++ b/tests/e2e/models/resnet50_fake_weights.mlir @@ -1,8 +1,8 @@ // ResNet50 model with placeholder weights, for testing. // Generated by resnet.ipynb with some manual and automated cleanup for testing. -// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=llvm-cpu %s --input=1x224x224x3xf32 | FileCheck %s -// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=vulkan-spirv %s --input=1x224x224x3xf32 | FileCheck %s) +// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=llvm-cpu %s --input=1x224x224x3xf32 | FileCheck %s +// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=vulkan-spirv %s --input=1x224x224x3xf32 | FileCheck %s) module { util.global private @"__iree_flow___sm_node188__m.layer-2.kernel" {noinline} = dense<1.000000e+00> : tensor<7x7x3x64xf32> diff --git a/tests/e2e/models/unidirectional_lstm.mlir b/tests/e2e/models/unidirectional_lstm.mlir index ab281148cc6f..3a5ebe817348 100644 --- a/tests/e2e/models/unidirectional_lstm.mlir +++ b/tests/e2e/models/unidirectional_lstm.mlir @@ -1,8 +1,8 @@ // An example LSTM exported from a python reference model with dummy weights. -// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=llvm-cpu %s --input="1x5xf32=[0,1,0,3,4]" --input="1x5x2x2xf32=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]" | FileCheck %s -// RUN: [[ $IREE_VMVX_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=vmvx %s --input="1x5xf32=[0,1,0,3,4]" --input="1x5x2x2xf32=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]" | FileCheck %s) -// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=vulkan-spirv %s --input="1x5xf32=[0,1,0,3,4]" --input="1x5x2x2xf32=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]" | FileCheck %s) +// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=llvm-cpu %s --input="1x5xf32=[0,1,0,3,4]" --input="1x5x2x2xf32=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]" | FileCheck %s +// RUN: [[ $IREE_VMVX_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=vmvx %s --input="1x5xf32=[0,1,0,3,4]" --input="1x5x2x2xf32=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]" | FileCheck %s) +// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=vulkan-spirv %s --input="1x5xf32=[0,1,0,3,4]" --input="1x5x2x2xf32=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]" | FileCheck %s) // Exported via the XLA HLO Importer // The resulting MLIR was modified by hand by changing all large constants to be diff --git a/tests/e2e/regression/BUILD.bazel b/tests/e2e/regression/BUILD.bazel index 9730796e9b3e..2a4b842b4d26 100644 --- a/tests/e2e/regression/BUILD.bazel +++ b/tests/e2e/regression/BUILD.bazel @@ -65,7 +65,7 @@ iree_check_single_backend_test_suite( "lowering_config.mlir", "pack_pad_transpose_1x9_into_2x4x8x4_issue_12546.mlir", ] + BACKEND_TESTS, - compiler_flags = ["--iree-input-type=mhlo"], + compiler_flags = ["--iree-input-type=mhlo_legacy"], driver = "local-task", target_backend = "llvm-cpu", ) @@ -88,7 +88,7 @@ iree_check_single_backend_test_suite( srcs = [ "layernorm.mlir", ] + BACKEND_TESTS, - compiler_flags = ["--iree-input-type=mhlo"], + compiler_flags = ["--iree-input-type=mhlo_legacy"], driver = "local-task", target_backend = "vmvx", ) @@ -97,7 +97,7 @@ iree_check_single_backend_test_suite( name = "check_regression_vulkan-spirv", # TODO(#10024): Fix layernorm.mlir on Pixel 6 and put in BACKEND_TESTS. srcs = BACKEND_TESTS, - compiler_flags = ["--iree-input-type=mhlo"], + compiler_flags = ["--iree-input-type=mhlo_legacy"], driver = "vulkan", target_backend = "vulkan-spirv", ) @@ -108,7 +108,7 @@ iree_check_single_backend_test_suite( "large_reduction.mlir", "layernorm.mlir", ] + BACKEND_TESTS, - compiler_flags = ["--iree-input-type=mhlo"], + compiler_flags = ["--iree-input-type=mhlo_legacy"], driver = "cuda", tags = [ # CUDA cuInit fails with sanitizer on. diff --git a/tests/e2e/regression/CMakeLists.txt b/tests/e2e/regression/CMakeLists.txt index 2154febaeca8..a99a8ae1fe95 100644 --- a/tests/e2e/regression/CMakeLists.txt +++ b/tests/e2e/regression/CMakeLists.txt @@ -58,7 +58,7 @@ iree_check_single_backend_test_suite( DRIVER "local-task" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" ) iree_check_single_backend_test_suite( @@ -98,7 +98,7 @@ iree_check_single_backend_test_suite( DRIVER "local-task" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" ) iree_check_single_backend_test_suite( @@ -124,7 +124,7 @@ iree_check_single_backend_test_suite( DRIVER "vulkan" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" ) iree_check_single_backend_test_suite( @@ -152,7 +152,7 @@ iree_check_single_backend_test_suite( DRIVER "cuda" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" LABELS "noasan" "nomsan" diff --git a/tests/e2e/regression/globals_ml_program.mlir b/tests/e2e/regression/globals_ml_program.mlir index 48507d183c5a..73a239992956 100644 --- a/tests/e2e/regression/globals_ml_program.mlir +++ b/tests/e2e/regression/globals_ml_program.mlir @@ -1,5 +1,5 @@ -// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=vmvx %s | FileCheck %s -// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo --Xcompiler,iree-hal-target-backends=vulkan-spirv %s | FileCheck %s) +// RUN: iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=vmvx %s | FileCheck %s +// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=mhlo_legacy --Xcompiler,iree-hal-target-backends=vulkan-spirv %s | FileCheck %s) module { ml_program.global private mutable @counter(dense<2.0> : tensor): tensor diff --git a/tests/e2e/regression/trace_dispatch_tensors.mlir b/tests/e2e/regression/trace_dispatch_tensors.mlir index 7fde0c8b966d..38cf9f450869 100644 --- a/tests/e2e/regression/trace_dispatch_tensors.mlir +++ b/tests/e2e/regression/trace_dispatch_tensors.mlir @@ -1,5 +1,5 @@ // RUN: iree-run-mlir \ -// RUN: --Xcompiler,iree-input-type=mhlo \ +// RUN: --Xcompiler,iree-input-type=mhlo_legacy \ // RUN: --Xcompiler,iree-hal-target-backends=vmvx \ // RUN: --Xcompiler,iree-flow-trace-dispatch-tensors \ // RUN: %s 2>&1 | FileCheck %s diff --git a/tests/e2e/vulkan_specific/BUILD.bazel b/tests/e2e/vulkan_specific/BUILD.bazel index cce918d61472..2a1307ffde72 100644 --- a/tests/e2e/vulkan_specific/BUILD.bazel +++ b/tests/e2e/vulkan_specific/BUILD.bazel @@ -20,7 +20,7 @@ iree_check_single_backend_test_suite( "dot_f16.mlir", ], compiler_flags = [ - "--iree-input-type=mhlo", + "--iree-input-type=mhlo_legacy", "--iree-vulkan-target-triple=valhall-unknown-android31", ], driver = "vulkan", @@ -38,7 +38,7 @@ iree_check_single_backend_test_suite( "conv.mlir", ], compiler_flags = [ - "--iree-input-type=mhlo", + "--iree-input-type=mhlo_legacy", "--iree-vulkan-target-triple=valhall-unknown-android31", ], driver = "vulkan", @@ -52,7 +52,7 @@ iree_check_single_backend_test_suite( "mul_i64.mlir", ], compiler_flags = [ - "--iree-input-type=mhlo", + "--iree-input-type=mhlo_legacy", "--iree-mhlo-demote-i64-to-i32=false", "--iree-vulkan-target-triple=valhall-unknown-android31", ], diff --git a/tests/e2e/vulkan_specific/CMakeLists.txt b/tests/e2e/vulkan_specific/CMakeLists.txt index a0a5578bd076..c8c0d476b989 100644 --- a/tests/e2e/vulkan_specific/CMakeLists.txt +++ b/tests/e2e/vulkan_specific/CMakeLists.txt @@ -21,7 +21,7 @@ iree_check_single_backend_test_suite( DRIVER "vulkan" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" "--iree-vulkan-target-triple=valhall-unknown-android31" LABELS "manual" @@ -39,7 +39,7 @@ iree_check_single_backend_test_suite( DRIVER "vulkan" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" "--iree-vulkan-target-triple=valhall-unknown-android31" ) @@ -54,7 +54,7 @@ iree_check_single_backend_test_suite( DRIVER "vulkan" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" "--iree-mhlo-demote-i64-to-i32=false" "--iree-vulkan-target-triple=valhall-unknown-android31" LABELS diff --git a/tests/e2e/xla_ops/BUILD.bazel b/tests/e2e/xla_ops/BUILD.bazel index 0a997bac8bf8..265ea87719bc 100644 --- a/tests/e2e/xla_ops/BUILD.bazel +++ b/tests/e2e/xla_ops/BUILD.bazel @@ -86,7 +86,7 @@ iree_check_single_backend_test_suite( "fft.mlir", # TODO(#9583) ], ), - compiler_flags = ["--iree-input-type=mhlo"], + compiler_flags = ["--iree-input-type=mhlo_legacy"], driver = "cuda", runner_args = ["--cuda_use_streams=false"], tags = [ @@ -169,7 +169,7 @@ iree_check_single_backend_test_suite( "fft.mlir", # TODO(#9583) ], ), - compiler_flags = ["--iree-input-type=mhlo"], + compiler_flags = ["--iree-input-type=mhlo_legacy"], driver = "cuda", runner_args = ["--cuda_use_streams=true"], tags = [ @@ -249,7 +249,7 @@ iree_check_single_backend_test_suite( ], include = ["*.mlir"], ), - compiler_flags = ["--iree-input-type=mhlo"], + compiler_flags = ["--iree-input-type=mhlo_legacy"], driver = "local-task", target_backend = "llvm-cpu", ) @@ -322,7 +322,7 @@ iree_check_single_backend_test_suite( "exponential_fp16.mlir", ], ), - compiler_flags = ["--iree-input-type=mhlo"], + compiler_flags = ["--iree-input-type=mhlo_legacy"], driver = "local-task", target_backend = "vmvx", ) @@ -395,7 +395,7 @@ iree_check_single_backend_test_suite( "reverse.mlir", #TODO(#12415): disabled due to miscompilation on Pixel 6. ], ), - compiler_flags = ["--iree-input-type=mhlo"], + compiler_flags = ["--iree-input-type=mhlo_legacy"], driver = "vulkan", target_backend = "vulkan-spirv", ) @@ -468,7 +468,7 @@ iree_check_single_backend_test_suite( include = ["*.mlir"], ), compiler_flags = [ - "--iree-input-type=mhlo", + "--iree-input-type=mhlo_legacy", "--iree-llvmcpu-target-cpu-features=host", ], driver = "local-task", diff --git a/tests/e2e/xla_ops/CMakeLists.txt b/tests/e2e/xla_ops/CMakeLists.txt index b6103770c586..2a9869b2ed9f 100644 --- a/tests/e2e/xla_ops/CMakeLists.txt +++ b/tests/e2e/xla_ops/CMakeLists.txt @@ -76,7 +76,7 @@ iree_check_single_backend_test_suite( DRIVER "cuda" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" RUNNER_ARGS "--cuda_use_streams=false" LABELS @@ -153,7 +153,7 @@ iree_check_single_backend_test_suite( DRIVER "cuda" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" RUNNER_ARGS "--cuda_use_streams=true" LABELS @@ -231,7 +231,7 @@ iree_check_single_backend_test_suite( DRIVER "local-task" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" ) iree_check_single_backend_test_suite( @@ -299,7 +299,7 @@ iree_check_single_backend_test_suite( DRIVER "local-task" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" ) iree_check_single_backend_test_suite( @@ -366,7 +366,7 @@ iree_check_single_backend_test_suite( DRIVER "vulkan" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" ) iree_check_single_backend_test_suite( @@ -436,7 +436,7 @@ iree_check_single_backend_test_suite( DRIVER "local-task" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" "--iree-llvmcpu-target-cpu-features=host" LABELS "hostonly" @@ -512,6 +512,6 @@ iree_check_single_backend_test_suite( # DRIVER # "webgpu" COMPILER_FLAGS - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" "--iree-codegen-gpu-native-math-precision=true" # TODO(#11321): Infer/flip default ) diff --git a/tests/microbenchmarks/CMakeLists.txt b/tests/microbenchmarks/CMakeLists.txt index 70f5e5312e01..8280dfd4975a 100644 --- a/tests/microbenchmarks/CMakeLists.txt +++ b/tests/microbenchmarks/CMakeLists.txt @@ -15,7 +15,7 @@ iree_microbenchmark_suite( "mhlo_fft_abs.mlir" FLAGS "--iree-hal-target-backends=llvm-cpu" - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" "--iree-llvmcpu-target-cpu-features=host" ) @@ -28,6 +28,6 @@ if(IREE_TARGET_BACKEND_CUDA) "linalg_transpose.mlir" FLAGS "--iree-hal-target-backends=cuda" - "--iree-input-type=mhlo" + "--iree-input-type=mhlo_legacy" ) endif()