From 152b6943ebf1c077ff017601ccf18adb7277a979 Mon Sep 17 00:00:00 2001 From: Nouamane Tazi Date: Sat, 20 May 2023 22:21:35 +0200 Subject: [PATCH] bump scratch buffers to 256 MB --- ggml.c | 3 ++- main.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ggml.c b/ggml.c index da3d914..782b9cf 100644 --- a/ggml.c +++ b/ggml.c @@ -3983,7 +3983,8 @@ struct ggml_tensor * ggml_new_tensor_impl( }; } else { if (ctx->scratch.offs + size_needed > ctx->scratch.size) { - GGML_PRINT("%s: not enough space in the scratch memory\n", __func__); + GGML_PRINT("%s: not enough space in the scratch memory pool (needed %zu, available %zu)\n", + __func__, ctx->scratch.offs + size_needed, ctx->scratch.size); assert(false); return NULL; } diff --git a/main.cpp b/main.cpp index 4427903..388bd29 100644 --- a/main.cpp +++ b/main.cpp @@ -418,10 +418,10 @@ bool starcoder_eval( // use 2 scratch buffers // TODO: very hacky solution - reimplement in a more elegant way - static size_t scr0_size = 128u*1024*1024; + static size_t scr0_size = 256u*1024*1024; static void * scr0 = malloc(scr0_size); - static size_t scr1_size = 128u*1024*1024; + static size_t scr1_size = 256u*1024*1024; static void * scr1 = malloc(scr1_size); if (mem_per_token > 0 && mem_per_token*N > buf_size) {