From d7f9220bb63405f2f874e29eaa3a98a45b2ac452 Mon Sep 17 00:00:00 2001 From: Krzysztof Drewniak Date: Mon, 28 Feb 2022 15:56:17 +0000 Subject: [PATCH] [MLIR] [AMDGPU] Use correct flags when building SerializeToHsaco The SerializeToHsaco pass does not depend on ROCm being available on the build system - it only requires ROCm to be present at runtime. However, the CMake file that built it tested for MLIR_ENABLE_ROCM_RUNNER , which implies that ROCm is currently available and is used to control building ROCm integration tests. Referencing MLIR_ENABLE_ROCM_RUNNER instead of MLIR_ENABLE_ROCM_CONVERSIONS in the SerializeToHsaco build therefore causes problems for clients who wish to build projects that depend on this pass on a system without an AMD GPU present. Reviewed By: whchung Differential Revision: https://reviews.llvm.org/D120663 --- mlir/lib/Dialect/GPU/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/lib/Dialect/GPU/CMakeLists.txt b/mlir/lib/Dialect/GPU/CMakeLists.txt index 788ab6a..56587d4 100644 --- a/mlir/lib/Dialect/GPU/CMakeLists.txt +++ b/mlir/lib/Dialect/GPU/CMakeLists.txt @@ -119,7 +119,7 @@ if(MLIR_ENABLE_CUDA_RUNNER) endif() -if(MLIR_ENABLE_ROCM_RUNNER) +if(MLIR_ENABLE_ROCM_CONVERSIONS) if (NOT ("AMDGPU" IN_LIST LLVM_TARGETS_TO_BUILD)) message(SEND_ERROR "Building mlir with ROCm support requires the AMDGPU backend") -- 2.7.4