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
4cfcbc32
Unverified
Commit
4cfcbc32
authored
Jul 10, 2024
by
Daniel Hiltgen
Committed by
GitHub
Jul 10, 2024
Browse files
Merge pull request #5124 from dhiltgen/amd_windows
Wire up windows AMD driver reporting
parents
79292ff3
784bf88b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
13 deletions
+9
-13
gpu/amd_hip_windows.go
gpu/amd_hip_windows.go
+2
-3
gpu/amd_windows.go
gpu/amd_windows.go
+7
-10
No files found.
gpu/amd_hip_windows.go
View file @
4cfcbc32
...
@@ -84,9 +84,8 @@ func (hl *HipLib) AMDDriverVersion() (driverMajor, driverMinor int, err error) {
...
@@ -84,9 +84,8 @@ func (hl *HipLib) AMDDriverVersion() (driverMajor, driverMinor int, err error) {
}
}
slog
.
Debug
(
"hipDriverGetVersion"
,
"version"
,
version
)
slog
.
Debug
(
"hipDriverGetVersion"
,
"version"
,
version
)
// TODO - this isn't actually right, but the docs claim hipDriverGetVersion isn't accurate anyway...
driverMajor
=
version
/
10000000
driverMajor
=
version
/
1000
driverMinor
=
(
version
-
(
driverMajor
*
10000000
))
/
100000
driverMinor
=
(
version
-
(
driverMajor
*
1000
))
/
10
return
driverMajor
,
driverMinor
,
nil
return
driverMajor
,
driverMinor
,
nil
}
}
...
...
gpu/amd_windows.go
View file @
4cfcbc32
...
@@ -35,12 +35,11 @@ func AMDGetGPUInfo() []RocmGPUInfo {
...
@@ -35,12 +35,11 @@ func AMDGetGPUInfo() []RocmGPUInfo {
}
}
defer
hl
.
Release
()
defer
hl
.
Release
()
// TODO - this reports incorrect version information, so omitting for now
driverMajor
,
driverMinor
,
err
:=
hl
.
AMDDriverVersion
()
// driverMajor, driverMinor, err := hl.AMDDriverVersion()
if
err
!=
nil
{
// if err != nil {
// For now this is benign, but we may eventually need to fail compatibility checks
// // For now this is benign, but we may eventually need to fail compatibility checks
slog
.
Debug
(
"error looking up amd driver version"
,
"error"
,
err
)
// slog.Debug("error looking up amd driver version", "error", err)
}
// }
// Note: the HIP library automatically handles subsetting to any HIP_VISIBLE_DEVICES the user specified
// Note: the HIP library automatically handles subsetting to any HIP_VISIBLE_DEVICES the user specified
count
:=
hl
.
HipGetDeviceCount
()
count
:=
hl
.
HipGetDeviceCount
()
...
@@ -132,10 +131,8 @@ func AMDGetGPUInfo() []RocmGPUInfo {
...
@@ -132,10 +131,8 @@ func AMDGetGPUInfo() []RocmGPUInfo {
MinimumMemory
:
rocmMinimumMemory
,
MinimumMemory
:
rocmMinimumMemory
,
Name
:
name
,
Name
:
name
,
Compute
:
gfx
,
Compute
:
gfx
,
DriverMajor
:
driverMajor
,
// TODO - this information isn't accurate on windows, so don't report it until we find the right way to retrieve
DriverMinor
:
driverMinor
,
// DriverMajor: driverMajor,
// DriverMinor: driverMinor,
},
},
index
:
i
,
index
:
i
,
}
}
...
...
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