[PATCH] D147581: [libc] Ensure that the required clang tools are up-to-date for libc GPU

Joseph Huber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 17:00:22 PDT 2023


jhuber6 added inline comments.


================
Comment at: llvm/runtimes/CMakeLists.txt:403
+    if(LIBC_GPU_BUILD OR LIBC_GPU_ARCHITECTURES)
+      list(APPEND extra_deps clang-offload-packager nvptx-arch amdgpu-arch)
+    endif()
----------------
tra wrote:
> Do these tools depend on something that may not be present on a build machine w/o GPU?  
> 
> I think `nvptx-arch` currently links with libcuda.so, which means that it will not build on machine w/o a NVIDIA GPU.  Ideally the app needs to dlopen(libcuda.so.1) and gracefully fail if it's not found.
> 
> 
> I think the dependency on nvptx-arch tools may need to be conditional on whether its build prerequisites are found.
Yes, `nvptx-arch` will attempt to dynamically open CUDA if it wasn't found beforehand. Otherwise they just depend on `ClangBasic` and other LLVM libraries that should be supported.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147581



More information about the llvm-commits mailing list