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
311f8e0c
Unverified
Commit
311f8e0c
authored
Jan 28, 2024
by
Daniel Hiltgen
Committed by
GitHub
Jan 28, 2024
Browse files
Merge pull request #2243 from dhiltgen/harden_zero_gpus
Harden for zero detected GPUs
parents
e02ecfb6
f07f8b7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
gpu/gpu.go
gpu/gpu.go
+2
-2
No files found.
gpu/gpu.go
View file @
311f8e0c
...
...
@@ -135,7 +135,7 @@ func GetGPUInfo() GpuInfo {
if
memInfo
.
err
!=
nil
{
slog
.
Info
(
fmt
.
Sprintf
(
"error looking up CUDA GPU memory: %s"
,
C
.
GoString
(
memInfo
.
err
)))
C
.
free
(
unsafe
.
Pointer
(
memInfo
.
err
))
}
else
{
}
else
if
memInfo
.
count
>
0
{
// Verify minimum compute capability
var
cc
C
.
cuda_compute_capability_t
C
.
cuda_compute_capability
(
*
gpuHandles
.
cuda
,
&
cc
)
...
...
@@ -157,7 +157,7 @@ func GetGPUInfo() GpuInfo {
}
else
if
memInfo
.
igpu_index
>=
0
&&
memInfo
.
count
==
1
{
// Only one GPU detected and it appears to be an integrated GPU - skip it
slog
.
Info
(
"ROCm unsupported integrated GPU detected"
)
}
else
{
}
else
if
memInfo
.
count
>
0
{
if
memInfo
.
igpu_index
>=
0
{
// We have multiple GPUs reported, and one of them is an integrated GPU
// so we have to set the env var to bypass it
...
...
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