[Mlir-commits] [llvm] [mlir] [mlir] Replace MLIR_ENABLE_ROCM_CONVERSIONS with LLVM_HAS_AMDGPU_TARGET (PR #182652)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Feb 21 16:58:44 PST 2026
================
@@ -41,7 +41,7 @@ expand_template(
"@LLVM_HAS_NVPTX_TARGET@": "0",
"@LLVM_INCLUDE_SPIRV_TOOLS_TESTS@": "0",
"@MLIR_ENABLE_CUDA_RUNNER@": "0",
- "@MLIR_ENABLE_ROCM_CONVERSIONS@": "0",
+ "@LLVM_HAS_AMDGPU_TARGET@": "0",
----------------
xys-syx wrote:
Thanks for the detailed explanation! You are right, both `LLVM_HAS_AMDGPU_TARGET` and `LLVM_HAS_NVPTX_TARGET` are hardcoded to 0 in the Bazel test overlay, so AMDGPU and NVPTX tests are unconditionally disabled regardless of which targets are actually built. The proper fix is to use conditionals like `"@LLVM_HAS_AMDGPU_TARGET@": "1" if (targets.contains("amdgpu")) else "0"` as you suggested. But since that affects both NVPTX and AMDGPU which is a bit border for this PR. The main goal of this PR is replacing `MLIR_ENABLE_ROCM_CONVERSIONS` with `LLVM_HAS_AMDGPU_TARGET`, bringing parity with the NVPTX target. So we'll fix the Bazel conditionals for both targets in a follow-up PR.
https://github.com/llvm/llvm-project/pull/182652
More information about the Mlir-commits
mailing list