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
c7ea8f23
Unverified
Commit
c7ea8f23
authored
Jan 03, 2024
by
Jeffrey Morgan
Committed by
GitHub
Jan 03, 2024
Browse files
set `num_gpu` to 1 only by default on darwin arm64 (#1771)
parent
0b3118e0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
gpu/gpu_darwin.go
gpu/gpu_darwin.go
+5
-1
No files found.
gpu/gpu_darwin.go
View file @
c7ea8f23
...
@@ -33,11 +33,15 @@ func getCPUMem() (memInfo, error) {
...
@@ -33,11 +33,15 @@ func getCPUMem() (memInfo, error) {
}
}
func
NumGPU
(
numLayer
,
fileSizeBytes
int64
,
opts
api
.
Options
)
int
{
func
NumGPU
(
numLayer
,
fileSizeBytes
int64
,
opts
api
.
Options
)
int
{
if
opts
.
NumGPU
!=
-
1
{
return
opts
.
NumGPU
}
// metal only supported on arm64
if
runtime
.
GOARCH
==
"arm64"
{
if
runtime
.
GOARCH
==
"arm64"
{
return
1
return
1
}
}
// metal only supported on arm64
return
0
return
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