mirror of
https://git.adityakumar.xyz/llama.cpp.git
synced 2025-02-22 15:40:02 +00:00
ggml : fix ggml_used_mem() (#1264)
This commit is contained in:
parent
70269cae37
commit
2bdc09646d
1 changed files with 1 additions and 1 deletions
2
ggml.c
2
ggml.c
|
@ -4411,7 +4411,7 @@ void ggml_free(struct ggml_context * ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t ggml_used_mem(const struct ggml_context * ctx) {
|
size_t ggml_used_mem(const struct ggml_context * ctx) {
|
||||||
return ctx->objects_end->offs + ctx->objects_end->size;
|
return ctx->objects_end == NULL ? 0 : ctx->objects_end->offs + ctx->objects_end->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t ggml_set_scratch(struct ggml_context * ctx, struct ggml_scratch scratch) {
|
size_t ggml_set_scratch(struct ggml_context * ctx, struct ggml_scratch scratch) {
|
||||||
|
|
Loading…
Reference in a new issue