]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
metal : use autoreleasepool to avoid memory leaks (llama/5437)
authorIan Bull <redacted>
Sat, 10 Feb 2024 10:53:28 +0000 (02:53 -0800)
committerGeorgi Gerganov <redacted>
Mon, 12 Feb 2024 07:31:11 +0000 (09:31 +0200)
commit47dfe9d4db25520dafb626b7f2d1646aa844ef14
treeb3ca9d38a3dedd0594b823e6270f2faf1eac92c4
parent1d3270cc8f69d7691ff79198679824c56ed39125
metal : use autoreleasepool to avoid memory leaks (llama/5437)

There appears to be a known memory leak when using the
`MLTCommandBuffer`. It is suggested to use `@autoreleasepool` in
[1,2]

[1] https://developer.apple.com/forums/thread/662721
[2] https://forums.developer.apple.com/forums/thread/120931

This change-set wraps the `ggml_metal_graph_compute` in a
`@autoreleasepool`.

This commit addresses https://github.com/ggerganov/llama.cpp/issues/5436
ggml-metal.m