Load libcuda.so.1 if libcuda.so is missing
This commit is contained in:
parent
a648b591a0
commit
febffdacc9
@ -50,8 +50,11 @@ struct Cuda {
|
|||||||
dlerror(); // clear
|
dlerror(); // clear
|
||||||
void *lib = dlopen("libcuda.so", RTLD_LAZY);
|
void *lib = dlopen("libcuda.so", RTLD_LAZY);
|
||||||
if(!lib) {
|
if(!lib) {
|
||||||
fprintf(stderr, "Error: failed to load libcuda.so, error: %s\n", dlerror());
|
lib = dlopen("libcuda.so.1", RTLD_LAZY);
|
||||||
return false;
|
if(!lib) {
|
||||||
|
fprintf(stderr, "Error: failed to load libcuda.so and libcuda.so.1, error: %s\n", dlerror());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cuInit = (CUINIT)load_symbol(lib, "cuInit");
|
cuInit = (CUINIT)load_symbol(lib, "cuInit");
|
||||||
|
Loading…
Reference in New Issue
Block a user