[llvm-branch-commits] [openmp] 64e9e9a - [OpenMP] Dropped unnecessary define when compiling deviceRTLs for NVPTX

Shilei Tian via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jan 14 10:59:24 PST 2021


Author: Shilei Tian
Date: 2021-01-14T13:55:12-05:00
New Revision: 64e9e9aeee0155fc12d7d40d56e7611a63d8e47d

URL: https://github.com/llvm/llvm-project/commit/64e9e9aeee0155fc12d7d40d56e7611a63d8e47d
DIFF: https://github.com/llvm/llvm-project/commit/64e9e9aeee0155fc12d7d40d56e7611a63d8e47d.diff

LOG: [OpenMP] Dropped unnecessary define when compiling deviceRTLs for NVPTX

The comment said CUDA 9 header files use the `nv_weak` attribute which
`clang` is not yet prepared to handle. It's three years ago and now things have
changed. Based on my test, removing the definition doesn't have any problem on
my machine with CUDA 11.1 installed.

Reviewed By: jdoerfert

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

Added: 
    

Modified: 
    openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
index 200c6401d628..c8acf6a31966 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
+++ b/openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
@@ -89,13 +89,6 @@ if(LIBOMPTARGET_DEP_CUDA_FOUND)
       set(bc_flags ${bc_flags} -DOMPTARGET_NVPTX_DEBUG=0)
     endif()
 
-    # CUDA 9 header files use the nv_weak attribute which clang is not yet prepared
-    # to handle. Therefore, we use 'weak' instead. We are compiling only for the
-    # device, so it should be equivalent.
-    if(CUDA_VERSION_MAJOR GREATER 8)
-      set(bc_flags ${bc_flags} -Dnv_weak=weak)
-    endif()
-
     # Create target to build all Bitcode libraries.
     add_custom_target(omptarget-nvptx-bc)
 


        


More information about the llvm-branch-commits mailing list