]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
metal : use shared buffers between CPU and GPU (#1696)
authorkiltyj <redacted>
Mon, 5 Jun 2023 20:24:04 +0000 (13:24 -0700)
committerGitHub <redacted>
Mon, 5 Jun 2023 20:24:04 +0000 (23:24 +0300)
commit9d0693bce38013364b1042568d9083353bfff48f
tree8311cb168defca62e9b2689571c4b641ea7654b9
parentefe05076323f5c6bafece109e21cce046f5e4b07
metal : use shared buffers between CPU and GPU (#1696)

* Use MTLDevice.newBufferWithBytesNoCopy to share buffers between CPU and GPU

* Page-align buffers used by Metal

* Remove trailing whitespace

* Only import unistd.h for Metal builds

* metal : remove unnecessary copies

---------

Co-authored-by: Georgi Gerganov <redacted>
ggml-metal.m
ggml.c
llama-util.h
llama.cpp