[all-commits] [llvm/llvm-project] 831d14: [Offload] libomptarget force dlopen vendor librari...

Ye Luo via All-commits all-commits at lists.llvm.org
Wed May 22 07:41:05 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 831d1435193e73026e03e006a5b86591f3d202b3
      https://github.com/llvm/llvm-project/commit/831d1435193e73026e03e006a5b86591f3d202b3
  Author: Ye Luo <yeluo at anl.gov>
  Date:   2024-05-22 (Wed, 22 May 2024)

  Changed paths:
    M offload/plugins-nextgen/amdgpu/CMakeLists.txt
    M offload/plugins-nextgen/cuda/CMakeLists.txt

  Log Message:
  -----------
  [Offload] libomptarget force dlopen vendor libraries by default. (#92788)

Since #87009, libomptarget directly links all the plugins statically.
All the dependencies of plugins got exposed to libomptarget. The CUDA
plugin depends on libcuda and the amdgpu plugin depends on libhsa if not
forced using dlopen. On a cluster with different compute node
architectures, libomptarget can be built and run on different nodes. In
the build stage, if cmake founds libcuda and
`LIBOMPTARGET_FORCE_DLOPEN_LIBCUDA=OFF`, libomptarget links libcuda.so
directly and the result libomptarget may not run a node without a NVIDIA
driver for example a CPU or AMD GPU only machine with a complaint that
libcuda.so not found.

The solution is setting `LIBOMPTARGET_FORCE_DLOPEN_LIBCUDA` and
`LIBOMPTARGET_FORCE_DLOPEN_LIBHSA` `ON`. Preferably this should be
default to maximize the usability of libomptarget. If cmake detects
NVIDIA or AMD software on an OS imaging building node, the resulted
libomptarget may not be able to function on the user side due to the
requirement the existence of vendor runtime libraries.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list