Skip to content

Commit 6dc2ab9

Browse files
committed
[mlir] Don't make the ROCm conversions depend on the execution engine
During a conversion to MLIR_ENABLE_EXECUTION_ENGINE from checking for the native target, the ROCm conversion passes (--serialize-to-hsaco) were mistakenly flagged for being disabled if the execution ending is not being built. These passes use LLVM to build binaries for AMD GPUs, and so require that backend to be enabled. However, they do not produce native code, nor do they interact with the JIT or any of the execution engine support libraries. When building MLIR into a compiler library that's intended to produce GPU binaries, we want to build only the AMDGPU backend and have the binary serialization passes available. This change makes that possible. It looks like the CUDA path might currently require a native target, it's hard to tell, so this commit leaves that if statement untouched. Reviewed By: fmorac Differential Revision: https://reviews.llvm.org/D155227
1 parent 91b9bde commit 6dc2ab9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ add_definitions(-DMLIR_CUDA_CONVERSIONS_ENABLED=${MLIR_ENABLE_CUDA_CONVERSIONS})
107107

108108
# Build the ROCm conversions and run according tests if the AMDGPU backend
109109
# is available.
110-
if ("AMDGPU" IN_LIST LLVM_TARGETS_TO_BUILD AND MLIR_ENABLE_EXECUTION_ENGINE)
110+
if ("AMDGPU" IN_LIST LLVM_TARGETS_TO_BUILD)
111111
set(MLIR_ENABLE_ROCM_CONVERSIONS 1)
112112
else()
113113
set(MLIR_ENABLE_ROCM_CONVERSIONS 0)

0 commit comments

Comments
 (0)