[Openmp-commits] [PATCH] D46930: [libomptarget-nvptx-bc] Pass found CUDA installations

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed May 16 01:40:51 PDT 2018


Hahnfeld created this revision.
Hahnfeld added reviewers: grokos, gtbercea, guansong.
Herald added subscribers: openmp-commits, mgorny, jholewinski.

We already know where the CUDA SDK is, so there is no point in
letting Clang search for it again and possibly finding no or
a different installation.

`--cuda-path` is supported since the beginning of CUDA support in
Clang, so making this required doesn't impose additional restrictions.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D46930

Files:
  libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake


Index: libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake
===================================================================
--- libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake
+++ libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake
@@ -79,7 +79,7 @@
 
 # These flags are required to emit LLVM Bitcode. We check them together because
 # if any of them are not supported, there is no point in finding out which are.
-set(compiler_flags_required -emit-llvm -O1 --cuda-device-only)
+set(compiler_flags_required -emit-llvm -O1 --cuda-device-only --cuda-path=${CUDA_TOOLKIT_ROOT_DIR})
 set(compiler_flags_required_src "extern \"C\" __device__ int thread() { return threadIdx.x; }")
 check_bitcode_compilation(LIBOMPTARGET_NVPTX_CUDA_COMPILER_SUPPORTS_FLAGS_REQUIRED "${compiler_flags_required_src}" ${compiler_flags_required})
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46930.147008.patch
Type: text/x-patch
Size: 869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180516/10482eea/attachment.bin>


More information about the Openmp-commits mailing list