]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
ggml: Don't assert fail when tensor data changes (llama/13222)
authorJesse Gross <redacted>
Thu, 1 May 2025 20:46:10 +0000 (13:46 -0700)
committerGeorgi Gerganov <redacted>
Fri, 2 May 2025 18:18:08 +0000 (21:18 +0300)
commit1e04f6aeb08c226a312d1e82ba0ea00c7a969433
tree3e8824c74c4ad401ac08bc89556b16653b4144e7
parentf04194a1b1dd7778d624bc4252612b257cebbedc
ggml: Don't assert fail when tensor data changes (llama/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.
src/ggml-alloc.c