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
d223f3b6
Commit
d223f3b6
authored
Feb 10, 2025
by
Jesse Gross
Committed by
Jesse Gross
Feb 13, 2025
Browse files
ggml-backend: Close on nil should be a no-op
parent
60830695
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
ml/backend/ggml/ggml.go
ml/backend/ggml/ggml.go
+4
-2
No files found.
ml/backend/ggml/ggml.go
View file @
d223f3b6
...
@@ -327,8 +327,10 @@ func (c Context) FromIntSlice(s []int32, shape ...int) (ml.Tensor, error) {
...
@@ -327,8 +327,10 @@ func (c Context) FromIntSlice(s []int32, shape ...int) (ml.Tensor, error) {
}
}
func
(
c
*
Context
)
Close
()
{
func
(
c
*
Context
)
Close
()
{
C
.
ggml_backend_sched_free
(
c
.
sched
)
if
c
!=
nil
{
C
.
ggml_free
(
c
.
ctx
)
C
.
ggml_backend_sched_free
(
c
.
sched
)
C
.
ggml_free
(
c
.
ctx
)
}
}
}
type
Tensor
struct
{
type
Tensor
struct
{
...
...
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