[Openmp-commits] [PATCH] D154107: [OpenMP] Adjust using the NVPTX architecture detection tool

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jun 29 10:15:01 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG968f65ae03f6: [OpenMP] Adjust using the NVPTX architecture detection tool (authored by jhuber6).

Changed prior to commit:
  https://reviews.llvm.org/D154107?vs=535851&id=535873#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154107

Files:
  openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake


Index: openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
===================================================================
--- openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
+++ openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
@@ -110,7 +110,13 @@
 ################################################################################
 set(LIBOMPTARGET_DEP_CUDA_ARCH "sm_35")
 
-find_program(LIBOMPTARGET_NVPTX_ARCH NAMES nvptx-arch PATHS ${LLVM_BINARY_DIR}/bin)
+if(TARGET nvptx-arch)
+  get_property(LIBOMPTARGET_NVPTX_ARCH TARGET nvptx-arch PROPERTY LOCATION)
+else()
+  find_program(LIBOMPTARGET_NVPTX_ARCH NAMES nvptx-arch
+               PATHS ${LLVM_TOOLS_BINARY_DIR}/bin)
+endif()
+
 if(LIBOMPTARGET_NVPTX_ARCH)
   execute_process(COMMAND ${LIBOMPTARGET_NVPTX_ARCH}
                   OUTPUT_VARIABLE LIBOMPTARGET_NVPTX_ARCH_OUTPUT
@@ -130,8 +136,9 @@
 
 if(TARGET amdgpu-arch)
   get_property(LIBOMPTARGET_AMDGPU_ARCH TARGET amdgpu-arch PROPERTY LOCATION)
- else()
-   find_program(LIBOMPTARGET_AMDGPU_ARCH NAMES amdgpu-arch PATHS ${LLVM_BINARY_DIR}/bin)
+else()
+  find_program(LIBOMPTARGET_AMDGPU_ARCH NAMES amdgpu-arch
+               PATHS ${LLVM_TOOLS_BINARY_DIR}/bin)
 endif()
 
 if(LIBOMPTARGET_AMDGPU_ARCH)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154107.535873.patch
Type: text/x-patch
Size: 1279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230629/946e57db/attachment-0001.bin>


More information about the Openmp-commits mailing list