]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
metal : try cwd for ggml-metal.metal if bundle lookup fails (#3793)
authorAarni Koskela <redacted>
Sat, 28 Oct 2023 12:43:01 +0000 (15:43 +0300)
committerGitHub <redacted>
Sat, 28 Oct 2023 12:43:01 +0000 (15:43 +0300)
commit82a6646e0221216c41edcdf99f5a44bb051391f5
tree8c0cf9dfa2db958ecd3c474b9d9d2bae6e955b95
parentba231e8a6dd8ad82acfe0e4d492ff7cef6b3f0a1
metal : try cwd for ggml-metal.metal if bundle lookup fails (#3793)

* Try cwd for ggml-metal if bundle lookup fails

When building with `-DBUILD_SHARED_LIBS=ON -DLLAMA_METAL=ON -DLLAMA_BUILD_SERVER=ON`,
`server` would fail to load `ggml-metal.metal` because `[bundle pathForResource:...]`
returns `nil`.  In that case, fall back to `ggml-metal.metal` in the cwd instead of
passing `null` as a path.

Follows up on #1782

* Update ggml-metal.m

---------

Co-authored-by: Georgi Gerganov <redacted>
ggml-metal.m