diff options
author | Joseph Huber <jhuber6@vols.utk.edu> | 2023-03-24 21:00:25 -0500 |
---|---|---|
committer | Joseph Huber <jhuber6@vols.utk.edu> | 2023-03-27 08:47:16 -0500 |
commit | b26970ec4b79590f41f5e1dd7cb56d5f8d4d9301 (patch) | |
tree | e8ded52c0f19c527232b98d8f7400e7dcd5d3618 /libc/utils | |
parent | 2e2093aa15a5d2c4ca36e90ee6b1b52c8e49fe6a (diff) | |
download | llvm-b26970ec4b79590f41f5e1dd7cb56d5f8d4d9301.tar.gz |
[libc] Enable integration tests targeting NVIDIA GPUs
This patch adds the necessary build infrastructure to build and run the
integration tests on NVIDIA GPUs. The NVIDIA `nvlink` linker utility is
what is ultimately used to combine these files into a single executable
image. Unfortunately, their tool does not support static libraries. So
we need to link with every object directly instead. This could be solved
by impelementing a "wrapper" utility around `nvlink` like we used to use
for OpenMP. But for now this should be sufficient.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D146861
Diffstat (limited to 'libc/utils')
-rw-r--r-- | libc/utils/gpu/loader/CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/utils/gpu/loader/CMakeLists.txt b/libc/utils/gpu/loader/CMakeLists.txt index 5e9f0a1a4955..f037d3f3e205 100644 --- a/libc/utils/gpu/loader/CMakeLists.txt +++ b/libc/utils/gpu/loader/CMakeLists.txt @@ -24,4 +24,12 @@ if(TARGET amdhsa_loader AND LIBC_GPU_TARGET_ARCHITECTURE_IS_AMDGPU) PROPERTIES EXECUTABLE "$<TARGET_FILE:amdhsa_loader>" ) +elseif(TARGET nvptx_loader AND LIBC_GPU_TARGET_ARCHITECTURE_IS_NVPTX) + add_custom_target(libc.utils.gpu.loader) + add_dependencies(libc.utils.gpu.loader nvptx_loader) + set_target_properties( + libc.utils.gpu.loader + PROPERTIES + EXECUTABLE "$<TARGET_FILE:nvptx_loader>" + ) endif() |