Skip to content

Commit 152b694

Browse files
committed
bump scratch buffers to 256 MB
1 parent 782b760 commit 152b694

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ggml.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3983,7 +3983,8 @@ struct ggml_tensor * ggml_new_tensor_impl(
39833983
};
39843984
} else {
39853985
if (ctx->scratch.offs + size_needed > ctx->scratch.size) {
3986-
GGML_PRINT("%s: not enough space in the scratch memory\n", __func__);
3986+
GGML_PRINT("%s: not enough space in the scratch memory pool (needed %zu, available %zu)\n",
3987+
__func__, ctx->scratch.offs + size_needed, ctx->scratch.size);
39873988
assert(false);
39883989
return NULL;
39893990
}

main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,10 +418,10 @@ bool starcoder_eval(
418418

419419
// use 2 scratch buffers
420420
// TODO: very hacky solution - reimplement in a more elegant way
421-
static size_t scr0_size = 128u*1024*1024;
421+
static size_t scr0_size = 256u*1024*1024;
422422
static void * scr0 = malloc(scr0_size);
423423

424-
static size_t scr1_size = 128u*1024*1024;
424+
static size_t scr1_size = 256u*1024*1024;
425425
static void * scr1 = malloc(scr1_size);
426426

427427
if (mem_per_token > 0 && mem_per_token*N > buf_size) {

0 commit comments

Comments
 (0)