[nvptx-arch] Dynamically load `libcuda.so.1` directly instead
authorJoseph Huber <jhuber6@vols.utk.edu>
Tue, 4 Apr 2023 23:10:51 +0000 (18:10 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Wed, 5 Apr 2023 00:50:31 +0000 (19:50 -0500)
commitad6a7d7dc9a2055ac3a4658d90ec86d78c3199b5
treef72177e6d249f6f302255024539594f22c81b4c4
parent5b461d5ec172d21029da492064704fe3da6f8bab
[nvptx-arch] Dynamically load `libcuda.so.1` directly instead

This patch loads the CUDA driver library directly via its real
`DT_SONAME`. This prevents the filesystem from needing to reload it in
cases when it's already loaded.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D147579
clang/tools/nvptx-arch/NVPTXArch.cpp