[PATCH] D80343: [mlir][gpu] Fix CMake errors in case NVPTX is not enabled.
Wen-Heng (Jack) Chung via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 20 16:34:09 PDT 2020
whchung created this revision.
whchung added a reviewer: nicolasvasilache.
whchung added a project: MLIR.
Herald added subscribers: llvm-commits, jurahul, Kayjukh, frgossen, grosul1, Joonsoo, stephenneuendorffer, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, csigg, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini, mgorny.
Herald added a reviewer: herhut.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80343
Files:
mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
mlir/test/lib/Transforms/CMakeLists.txt
Index: mlir/test/lib/Transforms/CMakeLists.txt
===================================================================
--- mlir/test/lib/Transforms/CMakeLists.txt
+++ mlir/test/lib/Transforms/CMakeLists.txt
@@ -1,3 +1,9 @@
+if (MLIR_CUDA_CONVERSIONS_ENABLED)
+ set(CUDA_TRANSFORMS
+ MLIRGPUtoCUDATransforms
+ )
+endif()
+
# Exclude tests from libMLIR.so
add_mlir_library(MLIRTestTransforms
TestAllReduceLowering.cpp
@@ -36,7 +42,6 @@
MLIRAnalysis
MLIREDSC
MLIRGPU
- MLIRGPUtoCUDATransforms
MLIRLinalgOps
MLIRLinalgTransforms
MLIRSCF
@@ -47,6 +52,7 @@
MLIRTransformUtils
MLIRVectorToSCF
MLIRVector
+ ${CUDA_TRANSFORMS}
)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../Dialect/Test)
Index: mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
===================================================================
--- mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
+++ mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
@@ -3,7 +3,6 @@
)
if (MLIR_CUDA_CONVERSIONS_ENABLED)
- list(APPEND SOURCES "ConvertKernelFuncToCubin.cpp")
set(NVPTX_LIBS
MC
NVPTXCodeGen
@@ -11,10 +10,8 @@
NVPTXInfo
)
-endif()
-
add_mlir_conversion_library(MLIRGPUtoCUDATransforms
- ${SOURCES}
+ ConvertKernelFuncToCubin.cpp
DEPENDS
MLIRConversionPassIncGen
@@ -33,3 +30,4 @@
MLIRSupport
MLIRTargetNVVMIR
)
+endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80343.265382.patch
Type: text/x-patch
Size: 1356 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200520/ae4366d0/attachment.bin>
More information about the llvm-commits
mailing list