From 94b659a2f106e017e5eeb6f492dc9f290e136833 Mon Sep 17 00:00:00 2001 From: Kawrakow Date: Tue, 25 Feb 2025 17:55:58 +0200 Subject: 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 --- ggml/src/ggml-alloc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ggml/src/ggml-alloc.c') 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"); } } -- cgit v1.2.3