[Openmp-commits] [openmp] r332495 - [libomptarget-nvptx-bc] Pass found CUDA installations

Jonas Hahnfeld via Openmp-commits openmp-commits at lists.llvm.org
Wed May 16 10:20:27 PDT 2018


Author: hahnfeld
Date: Wed May 16 10:20:27 2018
New Revision: 332495

URL: http://llvm.org/viewvc/llvm-project?rev=332495&view=rev
Log:
[libomptarget-nvptx-bc] Pass found CUDA installations

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.

Differential Revision: https://reviews.llvm.org/D46930

Modified:
    openmp/trunk/libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake

Modified: openmp/trunk/libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake?rev=332495&r1=332494&r2=332495&view=diff
==============================================================================
--- openmp/trunk/libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake (original)
+++ openmp/trunk/libomptarget/cmake/Modules/LibomptargetNVPTXBitcodeLibrary.cmake Wed May 16 10:20:27 2018
@@ -79,7 +79,7 @@ endfunction()
 
 # 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})
 




More information about the Openmp-commits mailing list