[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
This commit is contained in:
Joseph Huber 2023-04-04 18:10:51 -05:00
parent 5b461d5ec1
commit ad6a7d7dc9

View File

@ -49,7 +49,7 @@ CUresult (*cuGetErrorString)(CUresult, const char **);
CUresult (*cuDeviceGet)(CUdevice *, int);
CUresult (*cuDeviceGetAttribute)(int *, CUdevice_attribute, CUdevice);
constexpr const char *DynamicCudaPath = "libcuda.so";
constexpr const char *DynamicCudaPath = "libcuda.so.1";
llvm::Error loadCUDA() {
std::string ErrMsg;