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
10ed1b62
Commit
10ed1b62
authored
Mar 28, 2024
by
Daniel Hiltgen
Browse files
Detect too-old cuda driver
"cudart init failure: 35" isn't particularly helpful in the logs.
parent
4fec5816
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
gpu/gpu_info_cudart.c
gpu/gpu_info_cudart.c
+4
-0
gpu/gpu_info_cudart.h
gpu/gpu_info_cudart.h
+1
-0
No files found.
gpu/gpu_info_cudart.c
View file @
10ed1b62
...
@@ -62,6 +62,10 @@ void cudart_init(char *cudart_lib_path, cudart_init_resp_t *resp) {
...
@@ -62,6 +62,10 @@ void cudart_init(char *cudart_lib_path, cudart_init_resp_t *resp) {
LOG
(
resp
->
ch
.
verbose
,
"cudaSetDevice err: %d
\n
"
,
ret
);
LOG
(
resp
->
ch
.
verbose
,
"cudaSetDevice err: %d
\n
"
,
ret
);
UNLOAD_LIBRARY
(
resp
->
ch
.
handle
);
UNLOAD_LIBRARY
(
resp
->
ch
.
handle
);
resp
->
ch
.
handle
=
NULL
;
resp
->
ch
.
handle
=
NULL
;
if
(
ret
==
CUDA_ERROR_INSUFFICIENT_DRIVER
)
{
resp
->
err
=
strdup
(
"your nvidia driver is too old or missing, please upgrade to run ollama"
);
return
;
}
snprintf
(
buf
,
buflen
,
"cudart init failure: %d"
,
ret
);
snprintf
(
buf
,
buflen
,
"cudart init failure: %d"
,
ret
);
resp
->
err
=
strdup
(
buf
);
resp
->
err
=
strdup
(
buf
);
return
;
return
;
...
...
gpu/gpu_info_cudart.h
View file @
10ed1b62
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
typedef
enum
cudartReturn_enum
{
typedef
enum
cudartReturn_enum
{
CUDART_SUCCESS
=
0
,
CUDART_SUCCESS
=
0
,
CUDART_UNSUPPORTED
=
1
,
CUDART_UNSUPPORTED
=
1
,
CUDA_ERROR_INSUFFICIENT_DRIVER
=
35
,
// Other values omitted for now...
// Other values omitted for now...
}
cudartReturn_t
;
}
cudartReturn_t
;
...
...
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