]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
metal : use `vm_allocate` instead of `posix_memalign` on macOS (llama/7078)
authorGilad S <redacted>
Wed, 8 May 2024 19:08:10 +0000 (22:08 +0300)
committerGeorgi Gerganov <redacted>
Sat, 11 May 2024 18:30:08 +0000 (21:30 +0300)
commita9cb5d431ff3c3536325cfbcee79d3dccc560977
tree355a8f2572de8fbbf0903a1bca3542bbbca5f480
parent6d13791b1000e5128cb7d6c07ea49b3846a05547
metal : use `vm_allocate` instead of `posix_memalign` on macOS (llama/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
src/ggml-metal.m