]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
metal : use `vm_allocate` instead of `posix_memalign` on macOS (#7078)
authorGilad S <redacted>
Wed, 8 May 2024 19:08:10 +0000 (22:08 +0300)
committerGitHub <redacted>
Wed, 8 May 2024 19:08:10 +0000 (22:08 +0300)
commit26458af1d63c85195cd96cd1673051e332d06d30
tree24d3e0331b7aa59d9ec67a0db8bd6fd87adbf2ad
parent83330d8cd6491e53e1aca4c5dfc47e039b3c04ff
metal : use `vm_allocate` instead of `posix_memalign` on macOS (#7078)

* fix: use `malloc` instead of `posix_memalign` in `ggml-metal.m` to make it not crash Electron proccesses

* fix: typo

* fix: use `vm_allocate` instead of `posix_memalign`

* fix: don't call `newBufferWithBytesNoCopy` with `NULL` when `ggml_metal_host_malloc` returns `NULL`

* fix: use `vm_allocate` only on macOS
ggml-metal.m