slaren commited on
Commit
20a4ca1
·
unverified ·
1 Parent(s): 7fbc01f

llama : pre-allocate input tensors in a separate buffer (llama/5100)

Browse files
Files changed (1) hide show
  1. ggml-alloc.c +2 -2
ggml-alloc.c CHANGED
@@ -109,8 +109,8 @@ void ggml_tallocr_alloc(ggml_tallocr_t alloc, struct ggml_tensor * tensor) {
109
  if (block->size >= size) {
110
  best_fit_block = alloc->n_free_blocks - 1;
111
  } else {
112
- fprintf(stderr, "%s: not enough space in the buffer (needed %zu, largest block available %zu)\n",
113
- __func__, size, max_avail);
114
  GGML_ASSERT(!"not enough space in the buffer");
115
  return;
116
  }
 
109
  if (block->size >= size) {
110
  best_fit_block = alloc->n_free_blocks - 1;
111
  } else {
112
+ fprintf(stderr, "%s: not enough space in the buffer to allocate %s (needed %zu, largest block available %zu)\n",
113
+ __func__, tensor->name, size, max_avail);
114
  GGML_ASSERT(!"not enough space in the buffer");
115
  return;
116
  }