[Openmp-commits] [PATCH] D106600: [libomptarget] Build amdgpu plugin without hsa

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Jul 25 11:35:23 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe30b3b23a4ed: [libomptarget] Build amdgpu plugin without hsa (authored by JonChesterfield).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106600/new/

https://reviews.llvm.org/D106600

Files:
  openmp/libomptarget/plugins/amdgpu/CMakeLists.txt


Index: openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
===================================================================
--- openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
+++ openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
@@ -15,10 +15,6 @@
 
 # as of rocm-3.7, hsa is installed with cmake packages and kmt is found via hsa
 find_package(hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX} PATHS /opt/rocm)
-if (NOT ${hsa-runtime64_FOUND})
-  libomptarget_say("Not building AMDGPU plugin: hsa-runtime64 not found")
-  return()
-endif()
 
 if(NOT LIBOMPTARGET_DEP_LIBELF_FOUND)
   libomptarget_say("Not building AMDGPU plugin: LIBELF not found")
@@ -54,7 +50,7 @@
 set(LIBOMPTARGET_DLOPEN_LIBHSA OFF)
 option(LIBOMPTARGET_FORCE_DLOPEN_LIBHSA "Build with dlopened libhsa" ${LIBOMPTARGET_DLOPEN_LIBHSA})
 
-if (NOT LIBOMPTARGET_FORCE_DLOPEN_LIBHSA)
+if (${hsa-runtime64_FOUND} AND NOT LIBOMPTARGET_FORCE_DLOPEN_LIBHSA)
   libomptarget_say("Building AMDGPU plugin linked against libhsa")
   set(LIBOMPTARGET_EXTRA_SOURCE)
   set(LIBOMPTARGET_DEP_LIBRARIES hsa-runtime64::hsa-runtime64)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106600.361517.patch
Type: text/x-patch
Size: 1097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210725/1256f223/attachment.bin>


More information about the Openmp-commits mailing list