Skip to content

Commit 5709506

Browse files
authored
[offload] Fix finding amdgpu/nvptx-arch to generate tests (#135072)
PR #134713, which landed as 79cb6f0, causes this on my test systems: ``` -- Building AMDGPU plugin for dlopened libhsa -- Not generating AMDGPU tests, no supported devices detected. Use 'LIBOMPTARGET_FORCE_AMDGPU_TESTS' to override. -- Building CUDA plugin for dlopened libcuda -- Not generating NVIDIA tests, no supported devices detected. Use 'LIBOMPTARGET_FORCE_NVIDIA_TESTS' to override. ``` The problem is it cannot locate amdgpu-arch and nvptx-arch. This patch enables it to. I suspect there is more cleanup to do here. amdgpu-arch and nvptx-arch do not appear to exist as cmake targets anymore, but there is still cmake code here that looks for those targets.
1 parent 46de0ca commit 5709506

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

offload/cmake/Modules/LibomptargetGetDependencies.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ if(TARGET nvptx-arch)
5151
get_property(LIBOMPTARGET_NVPTX_ARCH TARGET nvptx-arch PROPERTY LOCATION)
5252
else()
5353
find_program(LIBOMPTARGET_NVPTX_ARCH NAMES nvptx-arch
54-
PATHS ${LLVM_TOOLS_BINARY_DIR}/bin)
54+
PATHS ${LLVM_TOOLS_BINARY_DIR})
5555
endif()
5656

5757
if(LIBOMPTARGET_NVPTX_ARCH)
@@ -75,7 +75,7 @@ if(TARGET amdgpu-arch)
7575
get_property(LIBOMPTARGET_AMDGPU_ARCH TARGET amdgpu-arch PROPERTY LOCATION)
7676
else()
7777
find_program(LIBOMPTARGET_AMDGPU_ARCH NAMES amdgpu-arch
78-
PATHS ${LLVM_TOOLS_BINARY_DIR}/bin)
78+
PATHS ${LLVM_TOOLS_BINARY_DIR})
7979
endif()
8080

8181
if(LIBOMPTARGET_AMDGPU_ARCH)

0 commit comments

Comments
 (0)