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
7865a699
Unverified
Commit
7865a699
authored
Mar 10, 2024
by
Daniel Hiltgen
Committed by
GitHub
Mar 10, 2024
Browse files
Merge pull request #3046 from dhiltgen/rocm_search_paths
Add ollama executable peer dir for rocm
parents
908005d9
00ec2693
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
gpu/amd_linux.go
gpu/amd_linux.go
+15
-0
No files found.
gpu/amd_linux.go
View file @
7865a699
...
...
@@ -287,6 +287,21 @@ func AMDValidateLibDir() (string, error) {
return
rocmTargetDir
,
nil
}
// next to the running binary
exe
,
err
:=
os
.
Executable
()
if
err
==
nil
{
peerDir
:=
filepath
.
Dir
(
exe
)
if
rocmLibUsable
(
peerDir
)
{
slog
.
Debug
(
"detected ROCM next to ollama executable "
+
peerDir
)
return
rocmTargetDir
,
setupLink
(
peerDir
,
rocmTargetDir
)
}
peerDir
=
filepath
.
Join
(
filepath
.
Dir
(
exe
),
"rocm"
)
if
rocmLibUsable
(
peerDir
)
{
slog
.
Debug
(
"detected ROCM next to ollama executable "
+
peerDir
)
return
rocmTargetDir
,
setupLink
(
peerDir
,
rocmTargetDir
)
}
}
// Well known ollama installer path
installedRocmDir
:=
"/usr/share/ollama/lib/rocm"
if
rocmLibUsable
(
installedRocmDir
)
{
...
...
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