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

@ -1834,8 +1834,9 @@ ggml_backend ggml_backend_cuda_init(void) {
ggml_backend_cuda_context * ctx = new ggml_backend_cuda_context;
ggml_backend cuda_backend = {
/* .interface = */ &cuda_backend_interface,
/* .context = */ ctx
/* .interface = = */ &cuda_backend_interface,
/* .context = */ ctx,
/* .is_ram_shared = */ false,
};
return cuda_backend;
}