[Mlir-commits] [mlir] f80c6d8 - Fix MLIR build when NVPTX backend is not configured in
Mehdi Amini
llvmlistbot at llvm.org
Mon Mar 9 21:12:05 PDT 2020
Author: Mehdi Amini
Date: 2020-03-10T04:11:49Z
New Revision: f80c6d8dec1866424d66a0b1ab67c082e2d08375
URL: https://github.com/llvm/llvm-project/commit/f80c6d8dec1866424d66a0b1ab67c082e2d08375
DIFF: https://github.com/llvm/llvm-project/commit/f80c6d8dec1866424d66a0b1ab67c082e2d08375.diff
LOG: Fix MLIR build when NVPTX backend is not configured in
The GPUToCUDA conversion needs to conditionally link it
in.
Added:
Modified:
mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
Removed:
################################################################################
diff --git a/mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt b/mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
index afc39066a03d..c8f0ded6bc19 100644
--- a/mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
+++ b/mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
@@ -8,14 +8,17 @@ set(SOURCES
if (MLIR_CUDA_CONVERSIONS_ENABLED)
list(APPEND SOURCES "ConvertKernelFuncToCubin.cpp")
+ set(NVPTX_LIBS
+ LLVMNVPTXCodeGen
+ LLVMNVPTXDesc
+ LLVMNVPTXInfo
+ )
endif()
add_mlir_conversion_library(MLIRGPUtoCUDATransforms ${SOURCES})
target_link_libraries(MLIRGPUtoCUDATransforms
PUBLIC
- LLVMNVPTXCodeGen
- LLVMNVPTXDesc
- LLVMNVPTXInfo
+ ${NVPTX_LIBS}
LLVMCore
LLVMMC
LLVMSupport
More information about the Mlir-commits
mailing list