[Openmp-commits] [openmp] 5d8a76f - [Libomptarget] Build the device library even if the sm list is empty

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 21 07:57:58 PDT 2022


Author: Joseph Huber
Date: 2022-07-21T10:57:47-04:00
New Revision: 5d8a76feb02ff3db5e25b9c5a8edff49e750f7fb

URL: https://github.com/llvm/llvm-project/commit/5d8a76feb02ff3db5e25b9c5a8edff49e750f7fb
DIFF: https://github.com/llvm/llvm-project/commit/5d8a76feb02ff3db5e25b9c5a8edff49e750f7fb.diff

LOG: [Libomptarget] Build the device library even if the sm list is empty

We previously had some logic that stopped us from building the device runtime if
there were no NVPTX architectures provided. This is incorrect because we could
have AMDGPU libraries. Even if the lists are empty we should be able to attempt
to build these and get dummy output. THis wilil make it much easier for our
tooling which expects certain libraries. If the user wishes to disable the
library entirely they should use `-DLIBOMPTARGET_BUILD_DEVICERTL_BCLIB=OFF"

Reviewed By: tianshilei1992

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

Added: 
    

Modified: 
    openmp/libomptarget/DeviceRTL/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
index 8fd5620c9a742..3ac3f59e8678e 100644
--- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
@@ -79,13 +79,6 @@ else()
   string(REPLACE "," ";" nvptx_sm_list "${LIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES}")
 endif()
 
-# If user set LIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES to empty, we disable the
-# build.
-if (NOT nvptx_sm_list)
-  libomptarget_say("Not building CUDA offloading DeviceRTL: empty compute capability list")
-  return()
-endif()
-
 # Check all SM values
 foreach(sm ${nvptx_sm_list})
   if (NOT ${sm} IN_LIST all_capabilities)


        


More information about the Openmp-commits mailing list