llama.cpp/ggml/src/ggml-metal
Robert Ormandi 86a1934978
metal : Extend how Llama.cpp locates metal resources (#10676)
* metal : Extend how Llama.cpp locates metal resources (#10675)

  * It searches the resource file in the directory where the current
    binary is located as well.
  * Resolves symbolic links.

Rationale:

When we plug this dependency into a Bazel build and run it in the
context of Bazel (e.g. testing):

  * the execution directory is often very different from where the files
    are located and no direct control over this (Bazel sandboxing),
  * the Bazel sandbox often use symbolic links to make files available.

With this patch, we can have the resource file added to the target,
can build and run tests in the context of Bazel.

* Update ggml/src/ggml-metal/ggml-metal.m

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

* Update ggml/src/ggml-metal/ggml-metal.m

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2024-12-07 09:55:01 +02:00
..
CMakeLists.txt ggml : add support for dynamic loading of backends (#10469) 2024-11-25 15:13:39 +01:00
ggml-metal-impl.h ggml: add GGML_SET Metal kernel + i32 CPU kernel (ggml/1037) 2024-12-05 13:27:33 +02:00
ggml-metal.m metal : Extend how Llama.cpp locates metal resources (#10676) 2024-12-07 09:55:01 +02:00
ggml-metal.metal ggml: add GGML_SET Metal kernel + i32 CPU kernel (ggml/1037) 2024-12-05 13:27:33 +02:00