]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
fix: use `vm_allocate` to allocate CPU backend buffer on macOS (#9875)
authorGilad S. <redacted>
Wed, 16 Oct 2024 22:36:51 +0000 (01:36 +0300)
committerGitHub <redacted>
Wed, 16 Oct 2024 22:36:51 +0000 (00:36 +0200)
commit73afe681aa76e818733fc1f30de082c1d6910bcd
tree57e5eeb599f64553c4cde8423bc23c15e0dca548
parent9e041024481f6b249ab8918e18b9477f873b5a5e
fix: use `vm_allocate` to allocate CPU backend buffer on macOS (#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
ggml/src/ggml-backend.cpp
ggml/src/ggml-impl.h
ggml/src/ggml.c