From 80ac697df93be2a833e87ece68c8ca95fb20b454 Mon Sep 17 00:00:00 2001 From: xaedes Date: Sat, 2 Sep 2023 21:44:20 +0200 Subject: [PATCH] move measurement memory segment to upper region of the address space --- ggml-alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml-alloc.c b/ggml-alloc.c index 83dfb5e45..2c481030e 100644 --- a/ggml-alloc.c +++ b/ggml-alloc.c @@ -285,7 +285,7 @@ struct ggml_allocr * ggml_allocr_new(void * data, size_t size, size_t alignment) // address and size of the buffer when measuring // it needs to be large enough to fit all the tensors, but it cannot overlap with other existing buffers -static void * const MEASURE_BASE_ADDR = (void *) 0x1000; +static void * const MEASURE_BASE_ADDR = (void *) (-(1ULL<<40) - 1); static const size_t MEASURE_MAX_SIZE = 1ULL<<40; // 1 TB struct ggml_allocr * ggml_allocr_new_measure(size_t alignment) {