fix error message in ggml_allocr_alloc to display actual max_avail

(cherry picked from commit 5854f51188)
This commit is contained in:
xaedes 2023-08-29 22:49:01 +02:00 committed by Cebtenzzre
parent 3d0d55f295
commit c472ab4f69

View file

@ -165,6 +165,7 @@ void ggml_allocr_alloc(struct ggml_allocr * alloc, struct ggml_tensor * tensor)
if (best_fit_block == -1) {
// the last block is our last resort
struct free_block * block = &alloc->free_blocks[alloc->n_free_blocks - 1];
max_avail = MAX(max_avail, block->size);
if (block->size >= size) {
best_fit_block = alloc->n_free_blocks - 1;
} else {