[ROCm] Drop deprecated --iree-hip flag aliases (#24381)
These aliases were deprecated in
https://github.com/iree-org/iree/pull/23420 on 2026-02-06. Three months
(89 days) have passed, so keep only the --iree-rocm-* flags and
IREE_ROCM_TEST_TARGET_CHIP.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 24137ca..7613f71 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -425,7 +425,7 @@
# chip because that would rely too much on guessing what the target chip is.
# But silently continuing with ROCm testing disabled by default has also been
# surprising.
-if ((IREE_HAL_DRIVER_HIP OR IREE_HAL_DRIVER_AMDGPU) AND NOT DEFINED CACHE{IREE_ROCM_TEST_TARGET_CHIP} AND NOT DEFINED CACHE{IREE_HIP_TEST_TARGET_CHIP})
+if ((IREE_HAL_DRIVER_HIP OR IREE_HAL_DRIVER_AMDGPU) AND NOT DEFINED CACHE{IREE_ROCM_TEST_TARGET_CHIP})
find_program(_ROCMINFO_COMMAND rocminfo)
if (_ROCMINFO_COMMAND)
execute_process(COMMAND ${_ROCMINFO_COMMAND} OUTPUT_VARIABLE _ROCMINFO_OUTPUT)
@@ -448,13 +448,6 @@
set(IREE_ROCM_TEST_TARGET_CHIP "" CACHE STRING
"Target chip for ROCm tests that need to compile device code. \
Defaults to empty string to disable tests.")
-# Backward compatibility: accept the old IREE_HIP_TEST_TARGET_CHIP name.
-set(IREE_HIP_TEST_TARGET_CHIP "" CACHE STRING
- "Deprecated; use IREE_ROCM_TEST_TARGET_CHIP instead.")
-if(IREE_HIP_TEST_TARGET_CHIP AND NOT IREE_ROCM_TEST_TARGET_CHIP)
- message(WARNING "IREE_HIP_TEST_TARGET_CHIP is deprecated; use IREE_ROCM_TEST_TARGET_CHIP instead.")
- set(IREE_ROCM_TEST_TARGET_CHIP "${IREE_HIP_TEST_TARGET_CHIP}" CACHE STRING "" FORCE)
-endif()
#-------------------------------------------------------------------------------
# Compiler Target Options
diff --git a/build_tools/cmake/build_and_test_asan.sh b/build_tools/cmake/build_and_test_asan.sh
index 2cb9094..48fe470 100755
--- a/build_tools/cmake/build_and_test_asan.sh
+++ b/build_tools/cmake/build_and_test_asan.sh
@@ -26,7 +26,7 @@
IREE_HAL_DRIVER_HIP="${IREE_HAL_DRIVER_HIP:-${OFF_IF_DARWIN}}"
IREE_TARGET_BACKEND_CUDA="${IREE_TARGET_BACKEND_CUDA:-${OFF_IF_DARWIN}}"
IREE_TARGET_BACKEND_ROCM="${IREE_TARGET_BACKEND_ROCM:-${OFF_IF_DARWIN}}"
-IREE_ROCM_TEST_TARGET_CHIP="${IREE_ROCM_TEST_TARGET_CHIP:-${IREE_HIP_TEST_TARGET_CHIP:-}}"
+IREE_ROCM_TEST_TARGET_CHIP="${IREE_ROCM_TEST_TARGET_CHIP:-}"
source build_tools/cmake/setup_build.sh
diff --git a/build_tools/cmake/build_and_test_tsan.sh b/build_tools/cmake/build_and_test_tsan.sh
index 6840fef..9302c11 100755
--- a/build_tools/cmake/build_and_test_tsan.sh
+++ b/build_tools/cmake/build_and_test_tsan.sh
@@ -24,7 +24,7 @@
IREE_HAL_DRIVER_HIP="${IREE_HAL_DRIVER_HIP:-${OFF_IF_DARWIN}}"
IREE_TARGET_BACKEND_CUDA="${IREE_TARGET_BACKEND_CUDA:-${OFF_IF_DARWIN}}"
IREE_TARGET_BACKEND_ROCM="${IREE_TARGET_BACKEND_ROCM:-${OFF_IF_DARWIN}}"
-IREE_ROCM_TEST_TARGET_CHIP="${IREE_ROCM_TEST_TARGET_CHIP:-${IREE_HIP_TEST_TARGET_CHIP:-}}"
+IREE_ROCM_TEST_TARGET_CHIP="${IREE_ROCM_TEST_TARGET_CHIP:-}"
source build_tools/cmake/setup_build.sh
diff --git a/build_tools/cmake/build_and_test_ubsan.sh b/build_tools/cmake/build_and_test_ubsan.sh
index 028d6d5..2c993f7 100755
--- a/build_tools/cmake/build_and_test_ubsan.sh
+++ b/build_tools/cmake/build_and_test_ubsan.sh
@@ -31,7 +31,7 @@
# Build hip tests for gfx942 to exercise codegen, but we won't run them.
# The user can override this to test other chips.
-IREE_ROCM_TEST_TARGET_CHIP="${IREE_ROCM_TEST_TARGET_CHIP:-${IREE_HIP_TEST_TARGET_CHIP:-gfx942}}"
+IREE_ROCM_TEST_TARGET_CHIP="${IREE_ROCM_TEST_TARGET_CHIP:-gfx942}"
source build_tools/cmake/setup_build.sh
diff --git a/build_tools/pkgci/build_tests_using_package.sh b/build_tools/pkgci/build_tests_using_package.sh
index 611e933..69c79f4 100755
--- a/build_tools/pkgci/build_tests_using_package.sh
+++ b/build_tools/pkgci/build_tests_using_package.sh
@@ -39,7 +39,7 @@
export IREE_METAL_DISABLE="${IREE_METAL_DISABLE:-1}"
export IREE_CUDA_ENABLE="${IREE_CUDA_ENABLE:-0}"
export IREE_HIP_ENABLE="${IREE_HIP_ENABLE:-0}"
-export IREE_ROCM_TEST_TARGET_CHIP="${IREE_ROCM_TEST_TARGET_CHIP:-${IREE_HIP_TEST_TARGET_CHIP:-}}"
+export IREE_ROCM_TEST_TARGET_CHIP="${IREE_ROCM_TEST_TARGET_CHIP:-}"
# Set cmake options based on disabled features.
declare -a cmake_config_options=()
diff --git a/compiler/plugins/target/ROCM/ROCMTarget.cpp b/compiler/plugins/target/ROCM/ROCMTarget.cpp
index 022a640..6ead0ee 100644
--- a/compiler/plugins/target/ROCM/ROCMTarget.cpp
+++ b/compiler/plugins/target/ROCM/ROCMTarget.cpp
@@ -212,19 +212,11 @@
"for more details."
// clang-format on
));
- binder.opt<std::string>(
- "iree-hip-target", target, cl::cat(category),
- cl::desc("Deprecated; use --iree-rocm-target instead."),
- Deprecated("use --iree-rocm-target instead"));
binder.opt<std::string>(
"iree-rocm-target-features", targetFeatures, cl::cat(category),
cl::desc("ROCM target features as expected by LLVM AMDGPU backend; "
"e.g., '+sramecc,+xnack'."));
- binder.opt<std::string>(
- "iree-hip-target-features", targetFeatures, cl::cat(category),
- cl::desc("Deprecated; use --iree-rocm-target-features instead."),
- Deprecated("use --iree-rocm-target-features instead"));
binder.opt<ContainerType>(
"iree-rocm-container-type", containerType,
@@ -243,28 +235,16 @@
binder.opt<std::string>("iree-rocm-bc-dir", bitcodeDirectory,
cl::cat(category),
cl::desc("Directory of ROCM Bitcode."));
- binder.opt<std::string>(
- "iree-hip-bc-dir", bitcodeDirectory, cl::cat(category),
- cl::desc("Deprecated; use --iree-rocm-bc-dir instead."),
- Deprecated("use --iree-rocm-bc-dir instead"));
binder.opt<int>("iree-rocm-waves-per-eu", wavesPerEu, cl::cat(category),
cl::desc("Optimization hint specifying minimum "
"number of waves per execution unit."));
- binder.opt<int>(
- "iree-hip-waves-per-eu", wavesPerEu, cl::cat(category),
- cl::desc("Deprecated; use --iree-rocm-waves-per-eu instead."),
- Deprecated("use --iree-rocm-waves-per-eu instead"));
binder.opt<std::string>(
"iree-rocm-enable-ukernels", enableROCMUkernels, cl::cat(category),
cl::desc("Enables microkernels in the ROCM compiler backend. May be "
"`default`, `none`, `all`, or a comma-separated list of "
"specific unprefixed microkernels to enable, e.g. `mmt4d`."));
- binder.opt<std::string>(
- "iree-hip-enable-ukernels", enableROCMUkernels, cl::cat(category),
- cl::desc("Deprecated; use --iree-rocm-enable-ukernels instead."),
- Deprecated("use --iree-rocm-enable-ukernels instead"));
binder.opt<std::string>(
"iree-rocm-encoding-layout-resolver", encodingLayoutResolver,
@@ -274,48 +254,24 @@
"identity layout), `pad` (additional padding "
"on allocations to maximize cache bandwidth), "
"and `data-tiling` (enable data tiled layouts)"));
- binder.opt<std::string>(
- "iree-hip-encoding-layout-resolver", encodingLayoutResolver,
- cl::cat(category),
- cl::desc(
- "Deprecated; use --iree-rocm-encoding-layout-resolver instead."),
- Deprecated("use --iree-rocm-encoding-layout-resolver instead"));
binder.opt<bool>("iree-rocm-llvm-slp-vec", slpVectorization,
cl::cat(category),
cl::desc("Enable slp vectorization in llvm opt."));
- binder.opt<bool>(
- "iree-hip-llvm-slp-vec", slpVectorization, cl::cat(category),
- cl::desc("Deprecated; use --iree-rocm-llvm-slp-vec instead."),
- Deprecated("use --iree-rocm-llvm-slp-vec instead"));
binder.opt<bool>("iree-rocm-llvm-global-isel", globalISel,
cl::cat(category),
cl::desc("Enable global instruction selection in llvm."));
- binder.opt<bool>(
- "iree-hip-llvm-global-isel", globalISel, cl::cat(category),
- cl::desc("Deprecated; use --iree-rocm-llvm-global-isel instead."),
- Deprecated("use --iree-rocm-llvm-global-isel instead"));
binder.opt<bool>(
"iree-rocm-specialize-dispatches", specializeDispatches,
cl::cat(category),
cl::desc(
"Enable runtime specialization of dynamically shaped dispatches."));
- binder.opt<bool>(
- "iree-hip-specialize-dispatches", specializeDispatches,
- cl::cat(category),
- cl::desc("Deprecated; use --iree-rocm-specialize-dispatches instead."),
- Deprecated("use --iree-rocm-specialize-dispatches instead"));
binder.opt<bool>("iree-rocm-enable-tensor-ukernels", enableTensorUKernels,
cl::cat(category),
cl::desc("Enable MLIR-based ukernels."));
- binder.opt<bool>(
- "iree-hip-enable-tensor-ukernels", enableTensorUKernels,
- cl::cat(category),
- cl::desc("Deprecated; use --iree-rocm-enable-tensor-ukernels instead."),
- Deprecated("use --iree-rocm-enable-tensor-ukernels instead"));
binder.opt<IREE::Codegen::DenormalFpMath>(
"iree-rocm-denormal-fp-math-f32", denormalFpMathF32, cl::cat(category),
@@ -326,34 +282,14 @@
"Convert denormals to zero while preserving sign"),
clEnumValN(IREE::Codegen::DenormalFpMath::PositiveZero,
"positive-zero", "Convert denormals to positive zero")));
- binder.opt<IREE::Codegen::DenormalFpMath>(
- "iree-hip-denormal-fp-math-f32", denormalFpMathF32, cl::cat(category),
- cl::desc("Deprecated; use --iree-rocm-denormal-fp-math-f32 instead."),
- Deprecated("use --iree-rocm-denormal-fp-math-f32 instead"),
- cl::values(
- clEnumValN(IREE::Codegen::DenormalFpMath::PreserveSign,
- "preserve-sign",
- "Convert denormals to zero while preserving sign"),
- clEnumValN(IREE::Codegen::DenormalFpMath::PositiveZero,
- "positive-zero", "Convert denormals to positive zero")));
binder.opt<bool>("iree-rocm-enable-register-spill-warning",
enableRegSpillWarning, cl::cat(category),
cl::desc("Report register spilling for AMD GPUs"));
- binder.opt<bool>(
- "iree-hip-enable-register-spill-warning", enableRegSpillWarning,
- cl::cat(category),
- cl::desc("Deprecated; use --iree-rocm-enable-register-spill-warning "
- "instead."),
- Deprecated("use --iree-rocm-enable-register-spill-warning instead"));
binder.opt<bool>("iree-rocm-emit-debug-info", debugSymbols,
cl::cat(category),
cl::desc("Generate and embed debug information (DWARF)."));
- binder.opt<bool>(
- "iree-hip-emit-debug-info", debugSymbols, cl::cat(category),
- cl::desc("Deprecated; use --iree-rocm-emit-debug-info instead."),
- Deprecated("use --iree-rocm-emit-debug-info instead"));
}
LogicalResult verify(mlir::Builder &builder) const {
diff --git a/docs/website/docs/guides/deployment-configurations/gpu-rocm.md b/docs/website/docs/guides/deployment-configurations/gpu-rocm.md
index ee995af..2b51e47 100644
--- a/docs/website/docs/guides/deployment-configurations/gpu-rocm.md
+++ b/docs/website/docs/guides/deployment-configurations/gpu-rocm.md
@@ -123,7 +123,7 @@
```
To see device details, including the architecture to use as a
-[HIP target](#choosing-hip-targets) when
+[ROCm target](#choosing-rocm-targets) when
[compiling a program](#compile-and-run-a-program):
```console hl_lines="9-10 15"
@@ -156,20 +156,20 @@
Then run the following command to compile with the `rocm` target backend:
```shell hl_lines="7-8"
-# You need to specify a HIP target for your GPU. For this example we extract
+# You need to specify a ROCm target for your GPU. For this example we extract
# the architecture name for the first device using rocm_agent_enumerator.
# See the section below for more context and alternatives.
-IREE_HIP_TARGET=$(rocm_agent_enumerator | sed -n '1 p') # e.g. gfx1100
+IREE_ROCM_TARGET=$(rocm_agent_enumerator | sed -n '1 p') # e.g. gfx1100
iree-compile \
--iree-hal-target-device=hip \
- --iree-rocm-target=${IREE_HIP_TARGET} \
- mobilenetv2.mlir -o mobilenet_hip.vmfb
+ --iree-rocm-target=${IREE_ROCM_TARGET} \
+ mobilenetv2.mlir -o mobilenet_rocm.vmfb
```
--8<-- "docs/website/docs/guides/deployment-configurations/snippets/_iree-optimization-options.md"
-???+ tip "Tip - HIP bitcode files"
+???+ tip "Tip - ROCm bitcode files"
That IREE comes with bundled bitcode files, which are used for linking
certain intrinsics on AMD GPUs. These will be used automatically or if the
@@ -178,9 +178,9 @@
For example, in ROCm installations on Linux, this is often found under
`/opt/rocm/amdgcn/bitcode`.
-#### Choosing HIP targets
+#### Choosing ROCm targets
-A HIP target (`iree-rocm-target`) matching the LLVM AMDGPU backend is needed
+A ROCm target (`iree-rocm-target`) matching the LLVM AMDGPU backend is needed
to compile towards each GPU chip. Here is a table of commonly used
architectures: