]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
ggml: Don't assert fail when tensor data changes (#13222)
authorJesse Gross <redacted>
Thu, 1 May 2025 20:46:10 +0000 (13:46 -0700)
committerGitHub <redacted>
Thu, 1 May 2025 20:46:10 +0000 (22:46 +0200)
commitf057808ffadce213f54c1884ab5096e60140f358
tree45711dd53732decbe3922dccd1901777232fa095
parentd7a14c42a1883a34a6553cbfe30da1e1b84dfd6a
ggml: Don't assert fail when tensor data changes (#13222)

The following scenario will cause an assertion failure in the graph
allocator:
 - Build and allocate a graph containing a tensor with a non-NULL data
   pointer
 - Build and allocate a new graph where that data is NULL

Result:
ggml-alloc.c:819: GGML_ASSERT(talloc->buffer_id >= 0) failed

This happens during revalidation because we think that memory should
have been previously allocated based on the current graph but in
reality the previous graph was different. In this situation, we
should do a full reallocation pass.
ggml/src/ggml-alloc.c