ggml : add is_ram_shared to ggml_backend

Metal can share the RAM memory and can utilize mmap without temp buffer
This commit is contained in:
Georgi Gerganov 2023-07-18 18:51:02 +03:00
parent 90503f150d
commit 652c849643
No known key found for this signature in database
GPG key ID: 449E073F9DC10735
4 changed files with 68 additions and 21 deletions

View file

@ -255,8 +255,9 @@ struct ggml_backend ggml_backend_cpu_init(void) {
ctx->work_size = 0;
struct ggml_backend cpu_backend = {
/* .interface = */ &cpu_backend_interface,
/* .context = */ ctx
/* .interface = */ &cpu_backend_interface,
/* .context = */ ctx,
/* .is_ram_shared = */ true,
};
return cpu_backend;
}