]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/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>
Fri, 1 Nov 2024 08:19:05 +0000 (10:19 +0200)
commitff5a8380997ab8ae6bb401dc375b5cae43d395f0
tree20496487ae89dd4bc94bc53d416f0760f04aa407
parent84713613bed98832a24b16b551813506ea2db8d2
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
ggml/src/ggml-backend.cpp
ggml/src/ggml-impl.h
ggml/src/ggml.c