]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
fix: use `vm_allocate` to allocate CPU backend buffer on macOS (llama/9875)
authorGilad S <redacted>
Wed, 16 Oct 2024 22:36:51 +0000 (01:36 +0300)
committerGeorgi Gerganov <redacted>
Wed, 23 Oct 2024 17:28:03 +0000 (20:28 +0300)
commitb4cc57b05f2c6df4bc73028c5efb4c057a7776a3
treeba3635815123077cdc9c6474573df794e66ff00d
parent6dccc647264f5429df2624f36138f601e7ce23e5
fix: use `vm_allocate` to allocate CPU backend buffer on macOS (llama/9875)

* fix: use `vm_allocate` to allocate CPU backend buffer on macOS

* fix: switch to `posix_memalign` to keep existing `free()` usages work

* feat: move `GGML_ALIGNED_MALLOC` to `ggml-backend-impl.h`, add support for `vm_allocate` on macOS

* style: formatting

* fix: move const outside of `#ifndef`

* style: formatting

* fix: unused var

* fix: transform `GGML_ALIGNED_MALLOC` and `GGML_ALIGNED_FREE` into functions and add them to `ggml-impl.h`

* fix: unused var

* fix: page align to `GGUF_DEFAULT_ALIGNMENT`

* fix: page align to `TENSOR_ALIGNMENT`

* fix: convert `TENSOR_ALIGNMENT` to a macro

* fix: increase page size to `32` on iOS

* fix: iOS page size

* fix: `hbw_posix_memalign` alignment
src/ggml-backend.cpp
src/ggml-impl.h
src/ggml.c