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
4a633cc2
Unverified
Commit
4a633cc2
authored
Jun 19, 2024
by
Daniel Hiltgen
Committed by
GitHub
Jun 19, 2024
Browse files
Merge pull request #5145 from dhiltgen/bad_loads
Fix bad symbol load detection
parents
2abebb2c
52ce350b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
gpu/gpu_info_cudart.c
gpu/gpu_info_cudart.c
+1
-1
gpu/gpu_info_nvcuda.c
gpu/gpu_info_nvcuda.c
+1
-1
gpu/gpu_info_nvml.c
gpu/gpu_info_nvml.c
+1
-1
No files found.
gpu/gpu_info_cudart.c
View file @
4a633cc2
...
@@ -40,7 +40,7 @@ void cudart_init(char *cudart_lib_path, cudart_init_resp_t *resp) {
...
@@ -40,7 +40,7 @@ void cudart_init(char *cudart_lib_path, cudart_init_resp_t *resp) {
for
(
i
=
0
;
l
[
i
].
s
!=
NULL
;
i
++
)
{
for
(
i
=
0
;
l
[
i
].
s
!=
NULL
;
i
++
)
{
*
l
[
i
].
p
=
LOAD_SYMBOL
(
resp
->
ch
.
handle
,
l
[
i
].
s
);
*
l
[
i
].
p
=
LOAD_SYMBOL
(
resp
->
ch
.
handle
,
l
[
i
].
s
);
if
(
!
l
[
i
].
p
)
{
if
(
!
*
(
l
[
i
].
p
)
)
{
char
*
msg
=
LOAD_ERR
();
char
*
msg
=
LOAD_ERR
();
LOG
(
resp
->
ch
.
verbose
,
"dlerr: %s
\n
"
,
msg
);
LOG
(
resp
->
ch
.
verbose
,
"dlerr: %s
\n
"
,
msg
);
UNLOAD_LIBRARY
(
resp
->
ch
.
handle
);
UNLOAD_LIBRARY
(
resp
->
ch
.
handle
);
...
...
gpu/gpu_info_nvcuda.c
View file @
4a633cc2
...
@@ -43,7 +43,7 @@ void nvcuda_init(char *nvcuda_lib_path, nvcuda_init_resp_t *resp) {
...
@@ -43,7 +43,7 @@ void nvcuda_init(char *nvcuda_lib_path, nvcuda_init_resp_t *resp) {
for
(
i
=
0
;
l
[
i
].
s
!=
NULL
;
i
++
)
{
for
(
i
=
0
;
l
[
i
].
s
!=
NULL
;
i
++
)
{
*
l
[
i
].
p
=
LOAD_SYMBOL
(
resp
->
ch
.
handle
,
l
[
i
].
s
);
*
l
[
i
].
p
=
LOAD_SYMBOL
(
resp
->
ch
.
handle
,
l
[
i
].
s
);
if
(
!*
l
[
i
].
p
)
{
if
(
!*
(
l
[
i
].
p
)
)
{
char
*
msg
=
LOAD_ERR
();
char
*
msg
=
LOAD_ERR
();
LOG
(
resp
->
ch
.
verbose
,
"dlerr: %s
\n
"
,
msg
);
LOG
(
resp
->
ch
.
verbose
,
"dlerr: %s
\n
"
,
msg
);
UNLOAD_LIBRARY
(
resp
->
ch
.
handle
);
UNLOAD_LIBRARY
(
resp
->
ch
.
handle
);
...
...
gpu/gpu_info_nvml.c
View file @
4a633cc2
...
@@ -42,7 +42,7 @@ void nvml_init(char *nvml_lib_path, nvml_init_resp_t *resp) {
...
@@ -42,7 +42,7 @@ void nvml_init(char *nvml_lib_path, nvml_init_resp_t *resp) {
// LOG(resp->ch.verbose, "dlsym: %s\n", l[i].s);
// LOG(resp->ch.verbose, "dlsym: %s\n", l[i].s);
*
l
[
i
].
p
=
LOAD_SYMBOL
(
resp
->
ch
.
handle
,
l
[
i
].
s
);
*
l
[
i
].
p
=
LOAD_SYMBOL
(
resp
->
ch
.
handle
,
l
[
i
].
s
);
if
(
!
l
[
i
].
p
)
{
if
(
!
*
(
l
[
i
].
p
)
)
{
resp
->
ch
.
handle
=
NULL
;
resp
->
ch
.
handle
=
NULL
;
char
*
msg
=
LOAD_ERR
();
char
*
msg
=
LOAD_ERR
();
LOG
(
resp
->
ch
.
verbose
,
"dlerr: %s
\n
"
,
msg
);
LOG
(
resp
->
ch
.
verbose
,
"dlerr: %s
\n
"
,
msg
);
...
...
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