bug fix, probably solves the 'ggml_allocr_alloc: not enough space in the buffer' issue
This commit is contained in:
parent
ded6382961
commit
8d982c8fd9
1 changed files with 1 additions and 1 deletions
|
@ -181,7 +181,7 @@ void ggml_allocr_alloc(struct ggml_allocr * alloc, struct ggml_tensor * tensor)
|
||||||
static void ggml_allocator_free_tensor(struct ggml_allocr * alloc, struct ggml_tensor * tensor) {
|
static void ggml_allocator_free_tensor(struct ggml_allocr * alloc, struct ggml_tensor * tensor) {
|
||||||
void * ptr = tensor->data;
|
void * ptr = tensor->data;
|
||||||
|
|
||||||
if (ptr < alloc->data || (char*)ptr >= (char*)alloc->data + alloc->max_size) {
|
if (ptr < alloc->data || (char*)ptr >= (char*)alloc->data + alloc->size) {
|
||||||
// the tensor was not allocated in this buffer
|
// the tensor was not allocated in this buffer
|
||||||
// this can happen because the graph allocator will try to free weights and other tensors from different buffers
|
// this can happen because the graph allocator will try to free weights and other tensors from different buffers
|
||||||
// the easiest way to deal with this is just to ignore it
|
// the easiest way to deal with this is just to ignore it
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue