]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
whisper : Metal and ggml-alloc support (#1270)
authorGeorgi Gerganov <redacted>
Fri, 15 Sep 2023 09:18:18 +0000 (12:18 +0300)
committerGitHub <redacted>
Fri, 15 Sep 2023 09:18:18 +0000 (12:18 +0300)
commit93935980f8bcc3d230d313174ff59635c3c80d1b
tree7b20e3db8fa22935151fbe37eaf907f9413d4824
parent3fec2119e6b52d1381b02a0fbf281b1b34728c25
whisper : Metal and ggml-alloc support (#1270)

* metal : init

* whisper : factor out graph builds

* whisper : allocate encoder and decoder using ggml-alloc

* whisper : ggml-alloc is now supported

* whisper : CoreML support ggml-alloc

* build : fix ggml-alloc

* ios : update submodule

* extra : update sync-ggml.sh script to also sync ggml-alloc

* ci : see if this is causing the crash

* whisper : refactor ggml-alloc init

* whisper.android : try to fix build

* whisper : initial Metal version

* ci : try to debug vmem issue

* metal : decoder works on GPU!

* metal : add multi-decoder support

* ggml : fix ggml_nbytes (probably temp solution)

* metal : run "cross" step on the GPU

* whisper : remove ggml_repeat in the encoder

* whisper : offload the Encoder to Metal

* ggml : use simpler ggml_bytes() implementation

* ggml-alloc : try to make CI happy by reducing vram to 128GB

* whisper : add whisper_allocr to wrap ggml_allocr

* whisper : factor out alloc init in a function

* cmake : update to support Metal build

* whisper : add <functional> header

* objc : fix build (no Metal yet)

* ios : add Metal support

* swiftui : fix build

* metal : speed-up KQ multiplication

* metal : sync latest llama.cpp kernels

* readme : add Metal info

* ios : update submodule

* coreml : add code to toggle Core ML config (CPU, ANE, GPU)

* bench : fix timings by running a pre-heat

* bench : start benching the decoder

* whisper : add ggml_mul_mat_pad

* bench : fix uninitialized vars

* whisper : add comment for disabling mul-mat padding

* whisper : add description of ggml_mul_mat_pad

* whisper : clean-up ggml_mul_mat_pad

* metal : remove the "concurrent" flag

* bench : variable n_past

* ios : update SPM package
18 files changed:
CMakeLists.txt
Makefile
README.md
bindings/ios
coreml/whisper-encoder.mm
examples/bench/bench.cpp
examples/talk-llama/CMakeLists.txt
examples/whisper.android/app/src/main/jni/whisper/CMakeLists.txt
examples/whisper.objc/README.md
examples/whisper.objc/whisper.objc.xcodeproj/project.pbxproj
examples/whisper.swiftui/whisper.swiftui.xcodeproj/project.pbxproj
extra/bench-all.sh
extra/sync-ggml.sh
ggml-alloc.c
ggml-metal.m
ggml-metal.metal
ggml.c
whisper.cpp