[Openmp-commits] [PATCH] D130266: [Libomptarget] Build the device library even if the sm list is empty

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 21 06:35:17 PDT 2022


jhuber6 created this revision.
jhuber6 added reviewers: tianshilei1992, JonChesterfield, jdoerfert.
Herald added subscribers: kosarev, tpr, mgorny.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added a project: OpenMP.
Herald added a subscriber: openmp-commits.

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"


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130266

Files:
  openmp/libomptarget/DeviceRTL/CMakeLists.txt


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130266.446470.patch
Type: text/x-patch
Size: 660 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220721/30f7cbef/attachment-0001.bin>


More information about the Openmp-commits mailing list