jhuber6 created this revision. jhuber6 added a reviewer: tra. Herald added subscribers: mattd, gchakrabarti, asavonic, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, jholewinski. Herald added a project: clang.
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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D147579 Files: clang/tools/nvptx-arch/NVPTXArch.cpp Index: clang/tools/nvptx-arch/NVPTXArch.cpp =================================================================== --- clang/tools/nvptx-arch/NVPTXArch.cpp +++ clang/tools/nvptx-arch/NVPTXArch.cpp @@ -49,7 +49,7 @@ 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;
Index: clang/tools/nvptx-arch/NVPTXArch.cpp =================================================================== --- clang/tools/nvptx-arch/NVPTXArch.cpp +++ clang/tools/nvptx-arch/NVPTXArch.cpp @@ -49,7 +49,7 @@ 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;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits