[Openmp-commits] [PATCH] D94700: [OpenMP] Dropped unnecessary define when compiling deviceRTLs for NVPTX

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jan 14 10:07:25 PST 2021


tianshilei1992 created this revision.
tianshilei1992 added reviewers: jdoerfert, Hahnfeld.
Herald added subscribers: guansong, yaxunl, mgorny.
tianshilei1992 requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94700

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


Index: openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
===================================================================
--- openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
+++ openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
@@ -147,13 +147,6 @@
       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)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94700.316696.patch
Type: text/x-patch
Size: 743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210114/affcceda/attachment.bin>


More information about the Openmp-commits mailing list