Skip to content

Commit ef52d1d

Browse files
0cc4mslaren
andauthored
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>
1 parent 14f8352 commit ef52d1d

File tree

4 files changed

+1302
-1218
lines changed

4 files changed

+1302
-1218
lines changed

ggml-alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ static bool alloc_tensor_range(struct ggml_context * ctx,
886886
fprintf(stderr, "%s: failed to allocate %s buffer of size %zu\n", __func__, ggml_backend_buft_name(buft), size);
887887
#endif
888888
for (size_t i = 0; i < *n_buffers; i++) {
889-
ggml_backend_buffer_free(*buffers[i]);
889+
ggml_backend_buffer_free((*buffers)[i]);
890890
}
891891
free(*buffers);
892892
return false;

0 commit comments

Comments
 (0)