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
4cbbf0e1
Unverified
Commit
4cbbf0e1
authored
May 06, 2024
by
Daniel Hiltgen
Committed by
GitHub
May 06, 2024
Browse files
Merge pull request #4090 from dhiltgen/rocm_paths
Support Fedoras standard ROCm location
parents
0963c650
e592e8fc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
8 deletions
+10
-8
gpu/amd_common.go
gpu/amd_common.go
+4
-2
gpu/amd_linux.go
gpu/amd_linux.go
+2
-2
gpu/amd_windows.go
gpu/amd_windows.go
+2
-2
scripts/install.sh
scripts/install.sh
+2
-2
No files found.
gpu/amd_common.go
View file @
4cbbf0e1
...
@@ -81,8 +81,10 @@ func commonAMDValidateLibDir() (string, error) {
...
@@ -81,8 +81,10 @@ func commonAMDValidateLibDir() (string, error) {
}
}
// Well known location(s)
// Well known location(s)
if
rocmLibUsable
(
RocmStandardLocation
)
{
for
_
,
path
:=
range
RocmStandardLocations
{
return
RocmStandardLocation
,
nil
if
rocmLibUsable
(
path
)
{
return
path
,
nil
}
}
}
// Installer payload location if we're running the installed binary
// Installer payload location if we're running the installed binary
...
...
gpu/amd_linux.go
View file @
4cbbf0e1
...
@@ -25,12 +25,12 @@ const (
...
@@ -25,12 +25,12 @@ const (
// Prefix with the node dir
// Prefix with the node dir
GPUTotalMemoryFileGlob
=
"mem_banks/*/properties"
// size_in_bytes line
GPUTotalMemoryFileGlob
=
"mem_banks/*/properties"
// size_in_bytes line
GPUUsedMemoryFileGlob
=
"mem_banks/*/used_memory"
GPUUsedMemoryFileGlob
=
"mem_banks/*/used_memory"
RocmStandardLocation
=
"/opt/rocm/lib"
)
)
var
(
var
(
// Used to validate if the given ROCm lib is usable
// Used to validate if the given ROCm lib is usable
ROCmLibGlobs
=
[]
string
{
"libhipblas.so.2*"
,
"rocblas"
}
// TODO - probably include more coverage of files here...
ROCmLibGlobs
=
[]
string
{
"libhipblas.so.2*"
,
"rocblas"
}
// TODO - probably include more coverage of files here...
RocmStandardLocations
=
[]
string
{
"/opt/rocm/lib"
,
"/usr/lib64"
}
)
)
// Gather GPU information from the amdgpu driver if any supported GPUs are detected
// Gather GPU information from the amdgpu driver if any supported GPUs are detected
...
...
gpu/amd_windows.go
View file @
4cbbf0e1
...
@@ -14,7 +14,6 @@ import (
...
@@ -14,7 +14,6 @@ import (
)
)
const
(
const
(
RocmStandardLocation
=
"C:
\\
Program Files
\\
AMD
\\
ROCm
\\
5.7
\\
bin"
// TODO glob?
// TODO We're lookinng for this exact name to detect iGPUs since hipGetDeviceProperties never reports integrated==true
// TODO We're lookinng for this exact name to detect iGPUs since hipGetDeviceProperties never reports integrated==true
iGPUName
=
"AMD Radeon(TM) Graphics"
iGPUName
=
"AMD Radeon(TM) Graphics"
...
@@ -22,7 +21,8 @@ const (
...
@@ -22,7 +21,8 @@ const (
var
(
var
(
// Used to validate if the given ROCm lib is usable
// Used to validate if the given ROCm lib is usable
ROCmLibGlobs
=
[]
string
{
"hipblas.dll"
,
"rocblas"
}
// TODO - probably include more coverage of files here...
ROCmLibGlobs
=
[]
string
{
"hipblas.dll"
,
"rocblas"
}
// TODO - probably include more coverage of files here...
RocmStandardLocations
=
[]
string
{
"C:
\\
Program Files
\\
AMD
\\
ROCm
\\
5.7
\\
bin"
}
// TODO glob?
)
)
func
AMDGetGPUInfo
()
[]
GpuInfo
{
func
AMDGetGPUInfo
()
[]
GpuInfo
{
...
...
scripts/install.sh
View file @
4cbbf0e1
...
@@ -166,8 +166,8 @@ fi
...
@@ -166,8 +166,8 @@ fi
if
check_gpu lspci amdgpu
||
check_gpu lshw amdgpu
;
then
if
check_gpu lspci amdgpu
||
check_gpu lshw amdgpu
;
then
# Look for pre-existing ROCm v6 before downloading the dependencies
# Look for pre-existing ROCm v6 before downloading the dependencies
for
search
in
"
${
HIP_PATH
:-
''
}
"
"
${
ROCM_PATH
:-
''
}
"
"/opt/rocm"
;
do
for
search
in
"
${
HIP_PATH
:-
''
}
"
"
${
ROCM_PATH
:-
''
}
"
"/opt/rocm"
"/usr/lib64"
;
do
if
[
-n
"
${
search
}
"
]
&&
[
-e
"
${
search
}
/lib/libhipblas.so.2"
]
;
then
if
[
-n
"
${
search
}
"
]
&&
[
-e
"
${
search
}
/libhipblas.so.2"
-o
-e
"
${
search
}
/lib/libhipblas.so.2"
]
;
then
status
"Compatible AMD GPU ROCm library detected at
${
search
}
"
status
"Compatible AMD GPU ROCm library detected at
${
search
}
"
install_success
install_success
exit
0
exit
0
...
...
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