-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[offload] Fix finding amdgpu/nvptx-arch to generate tests #135072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR llvm#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.
@llvm/pr-subscribers-offload Author: Joel E. Denny (jdenny-ornl) ChangesPR #134713, which landed as 79cb6f0, causes this on my test systems:
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. Full diff: https://github.com/llvm/llvm-project/pull/135072.diff 1 Files Affected:
diff --git a/offload/cmake/Modules/LibomptargetGetDependencies.cmake b/offload/cmake/Modules/LibomptargetGetDependencies.cmake
index c296f7ea3863e..2a8bdebf2c1dd 100644
--- a/offload/cmake/Modules/LibomptargetGetDependencies.cmake
+++ b/offload/cmake/Modules/LibomptargetGetDependencies.cmake
@@ -51,7 +51,7 @@ 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)
+ PATHS ${LLVM_TOOLS_BINARY_DIR})
endif()
if(LIBOMPTARGET_NVPTX_ARCH)
@@ -75,7 +75,7 @@ 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_TOOLS_BINARY_DIR}/bin)
+ PATHS ${LLVM_TOOLS_BINARY_DIR})
endif()
if(LIBOMPTARGET_AMDGPU_ARCH)
|
I'm unsure why the change would cause it to no longer emit to |
For me, before PR #134713, it took the Now in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, usually the binary dir thing refers to the CMake output directory, not literal bin/
. This should be the path that's taken on a runtimes build, so I'm unsure how it's hitting that. Could be some LLVM magic, I'm not sure.
When I grep LLVM source for LLVM_TOOLS_BINARY_DIR, I see stuff like:
So it appears to be normal for it to include bin. Am I missing your point? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, but I'm wondering why this 'works' currently? (Or worked).
Thanks for the quick reviews. Not sure what you mean by "works". For me, the offload tests just weren't generated, so everything quietly succeeded. |
PR llvm#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.
PR llvm#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.
PR #134713, which landed as 79cb6f0, causes this on my test systems:
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.