Skip to content

Commit

Permalink
Disable ggml-alloc assert for CPU version of Sam.cpp if the view does…
Browse files Browse the repository at this point in the history
…n't have a buffer (ggerganov#562)
  • Loading branch information
Yavor Ivanov committed Oct 9, 2023
1 parent 2da43c2 commit 50d7203
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ggml-alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ static void init_view(struct ggml_allocr * alloc, struct ggml_tensor * view) {

// FIXME: the view should be initialized by the owning buffer, but currently this breaks the CUDA backend
// due to the ggml_tensor_extra_gpu ring buffer overwriting the KV cache extras
assert(ggml_allocr_is_measure(alloc) || view->buffer->backend == alloc->buffer->backend);
assert(ggml_allocr_is_measure(alloc) || !view->buffer || view->buffer->backend == alloc->buffer->backend);
ggml_backend_buffer_init_tensor(alloc->buffer, view);
}

Expand Down

0 comments on commit 50d7203

Please sign in to comment.