Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
1d1eb168
Commit
1d1eb168
authored
Dec 19, 2023
by
Daniel Hiltgen
Browse files
Additional nvidial-ml path to check
parent
6558f94e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
gpu/gpu_info_cuda.c
gpu/gpu_info_cuda.c
+3
-0
No files found.
gpu/gpu_info_cuda.c
View file @
1d1eb168
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
const
char
*
cuda_lib_paths
[]
=
{
const
char
*
cuda_lib_paths
[]
=
{
"libnvidia-ml.so"
,
"libnvidia-ml.so"
,
"/usr/local/cuda/lib64/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?
"/usr/lib/wsl/lib/libnvidia-ml.so.1"
,
// TODO Maybe glob?
NULL
,
NULL
,
};
};
...
@@ -40,6 +41,8 @@ void cuda_init(cuda_init_resp_t *resp) {
...
@@ -40,6 +41,8 @@ void cuda_init(cuda_init_resp_t *resp) {
resp
->
ch
.
handle
=
LOAD_LIBRARY
(
cuda_lib_paths
[
i
],
RTLD_LAZY
);
resp
->
ch
.
handle
=
LOAD_LIBRARY
(
cuda_lib_paths
[
i
],
RTLD_LAZY
);
}
}
if
(
!
resp
->
ch
.
handle
)
{
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
,
snprintf
(
buf
,
buflen
,
"Unable to load %s library to query for Nvidia GPUs: %s"
,
"Unable to load %s library to query for Nvidia GPUs: %s"
,
cuda_lib_paths
[
0
],
LOAD_ERR
());
cuda_lib_paths
[
0
],
LOAD_ERR
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment