Skip to content

Commit 95bd60a

Browse files
authored
ggml-alloc : fix assert in debug builds (#3555)
1 parent fcca0a7 commit 95bd60a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml-alloc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ static void init_view(struct ggml_allocr * alloc, struct ggml_tensor * view) {
386386

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

0 commit comments

Comments
 (0)