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
bf920883
Commit
bf920883
authored
Feb 26, 2025
by
Michael Yang
Browse files
ml/backend/ggml: set cpu n_threads
parent
58b9ec1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
ml/backend/ggml/ggml.go
ml/backend/ggml/ggml.go
+4
-0
No files found.
ml/backend/ggml/ggml.go
View file @
bf920883
...
...
@@ -301,6 +301,10 @@ func New(r *os.File, params ml.BackendParams) (ml.Backend, error) {
bufts
=
append
(
bufts
,
bt
)
slog
.
Info
(
"compute graph"
,
"backend"
,
C
.
GoString
(
C
.
ggml_backend_name
(
b
)),
"buffer_type"
,
C
.
GoString
(
C
.
ggml_backend_buft_name
(
bt
)))
if
C
.
ggml_backend_is_cpu
(
b
)
{
C
.
ggml_backend_cpu_set_n_threads
(
b
,
C
.
int
(
params
.
NumThreads
))
}
}
return
&
Backend
{
...
...
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