From 1d1eb1688cf46c4b9aa599047d98ffc4d723b692 Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Tue, 19 Dec 2023 15:52:34 -0800 Subject: [PATCH] Additional nvidial-ml path to check --- gpu/gpu_info_cuda.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gpu/gpu_info_cuda.c b/gpu/gpu_info_cuda.c index 30aba037..20055ed6 100644 --- a/gpu/gpu_info_cuda.c +++ b/gpu/gpu_info_cuda.c @@ -8,6 +8,7 @@ const char *cuda_lib_paths[] = { "libnvidia-ml.so", "/usr/local/cuda/lib64/libnvidia-ml.so", + "/usr/lib/x86_64-linux-gnu/nvidia/current/libnvidia-ml.so", "/usr/lib/wsl/lib/libnvidia-ml.so.1", // TODO Maybe glob? NULL, }; @@ -40,6 +41,8 @@ void cuda_init(cuda_init_resp_t *resp) { resp->ch.handle = LOAD_LIBRARY(cuda_lib_paths[i], RTLD_LAZY); } if (!resp->ch.handle) { + // TODO improve error message, as the LOAD_ERR will have typically have the + // final path that was checked which might be confusing. snprintf(buf, buflen, "Unable to load %s library to query for Nvidia GPUs: %s", cuda_lib_paths[0], LOAD_ERR());