Load libcuda.so.1 if libcuda.so is missing
This commit is contained in:
parent
a648b591a0
commit
febffdacc9
@ -50,9 +50,12 @@ 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);
|
||||||
|
if(!lib) {
|
||||||
|
fprintf(stderr, "Error: failed to load libcuda.so and libcuda.so.1, error: %s\n", dlerror());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cuInit = (CUINIT)load_symbol(lib, "cuInit");
|
cuInit = (CUINIT)load_symbol(lib, "cuInit");
|
||||||
if(!cuInit)
|
if(!cuInit)
|
||||||
|
Loading…
Reference in New Issue
Block a user