diff options
author | Kawrakow <iwankawrakow@gmail.com> | 2025-02-25 17:55:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-25 17:55:58 +0200 |
commit | 94b659a2f106e017e5eeb6f492dc9f290e136833 (patch) | |
tree | 8b744ff19b476f7d08e9691def83ad3fbb27c763 /ggml/src/ggml-alloc.c | |
parent | 547eee81d99a2676975a9768166b7d164473b8fa (diff) |
Give the user the option to override where model weights are stored (#232)
* Give the user the option to override where model weights are stored
* Fix ggml_nbytes() problem and cleanup
For a tensor with zero elements ggml_nbytes() was returning
uint64_t::max, and this was causing graph allocation failure.
* Add timing info to CUDA graph evaluation
* Add more timing info
---------
Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
Diffstat (limited to 'ggml/src/ggml-alloc.c')
-rw-r--r-- | ggml/src/ggml-alloc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ggml/src/ggml-alloc.c b/ggml/src/ggml-alloc.c index e485326a..d811dee6 100644 --- a/ggml/src/ggml-alloc.c +++ b/ggml/src/ggml-alloc.c @@ -174,6 +174,8 @@ static size_t ggml_dyn_tallocr_alloc(struct ggml_dyn_tallocr * alloc, size_t siz // this should never happen fprintf(stderr, "%s: not enough space in the buffer to allocate %zu bytes, largest block available %zu bytes\n", __func__, size, max_avail); + fprintf(stderr, "%s: tensor was %s with %zu elements and %zu bytes\n", __func__, tensor->name, + ggml_nelements(tensor), ggml_nbytes(tensor)); GGML_ABORT("not enough space in the buffer"); } } |