summaryrefslogtreecommitdiff
path: root/ggml-alloc.c
diff options
context:
space:
mode:
author0cc4m <picard12@live.de>2024-06-11 21:20:29 +0200
committerGitHub <noreply@github.com>2024-06-11 21:20:29 +0200
commitef52d1d16afc695d798396cdd13594ea5e45a9dd (patch)
treed6ef7a296ce1df22eb803650da442a1c5ca55340 /ggml-alloc.c
parent14f83526cd27f638c856ea6eff08110b9860eb2a (diff)
Update Vulkan RoPE implementation (#7818)
* Update Vulkan RoPE implementation * Return nullptr on alloc_buffer when allocation fails, instead of throwing an exception Minor fixes * Fix segfault when running out of VRAM Co-authored-by: slaren <slarengh@gmail.com> --------- Co-authored-by: slaren <slarengh@gmail.com>
Diffstat (limited to 'ggml-alloc.c')
-rw-r--r--ggml-alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ggml-alloc.c b/ggml-alloc.c
index 73a3c157..eb75962d 100644
--- a/ggml-alloc.c
+++ b/ggml-alloc.c
@@ -886,7 +886,7 @@ static bool alloc_tensor_range(struct ggml_context * ctx,
fprintf(stderr, "%s: failed to allocate %s buffer of size %zu\n", __func__, ggml_backend_buft_name(buft), size);
#endif
for (size_t i = 0; i < *n_buffers; i++) {
- ggml_backend_buffer_free(*buffers[i]);
+ ggml_backend_buffer_free((*buffers)[i]);
}
free(*buffers);
return false;