[PATCH] D47888: [Polly] Back out of GPU Codegen if NVPTX is not available
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 7 14:15:03 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL334233: Back out of GPU Codegen if NVPTX is not available (authored by pfaffe, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D47888
Files:
polly/trunk/CMakeLists.txt
Index: polly/trunk/CMakeLists.txt
===================================================================
--- polly/trunk/CMakeLists.txt
+++ polly/trunk/CMakeLists.txt
@@ -97,14 +97,17 @@
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
option(POLLY_ENABLE_GPGPU_CODEGEN "Enable GPGPU code generation feature" OFF)
+set(GPU_CODEGEN FALSE)
if (POLLY_ENABLE_GPGPU_CODEGEN)
# Do not require CUDA/OpenCL, as GPU code generation test cases can be run
# without a CUDA/OpenCL library.
- FIND_PACKAGE(CUDA)
- FIND_PACKAGE(OpenCL)
- set(GPU_CODEGEN TRUE)
-else(POLLY_ENABLE_GPGPU_CODEGEN)
- set(GPU_CODEGEN FALSE)
+ if ("NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD)
+ FIND_PACKAGE(CUDA)
+ FIND_PACKAGE(OpenCL)
+ set(GPU_CODEGEN TRUE)
+ else()
+ message(WARNING "The LLVM NVPTX target is required for GPU code generation")
+ endif()
endif(POLLY_ENABLE_GPGPU_CODEGEN)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47888.150404.patch
Type: text/x-patch
Size: 877 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180607/4b60b3e5/attachment.bin>
More information about the llvm-commits
mailing list