Add mmap support for model files

This commit is contained in:
Slaren 2023-03-29 02:03:43 +02:00 committed by Justine Tunney
parent 3bcc129ba8
commit c03ae8dca1
3 changed files with 74 additions and 22 deletions

1
ggml.h
View file

@ -316,6 +316,7 @@ struct ggml_init_params {
// memory pool
size_t mem_size; // bytes
void * mem_buffer; // if NULL, memory will be allocated internally
bool no_alloc; // don't allocate memory for the tensor data
};
void ggml_time_init(void); // call this once at the beginning of the program