]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
ggml : add NUMA support (#1556)
authorzrm <redacted>
Mon, 26 Jun 2023 17:57:59 +0000 (13:57 -0400)
committerGitHub <redacted>
Mon, 26 Jun 2023 17:57:59 +0000 (20:57 +0300)
commitb853d456018b10820686362af41b2f2f75f1eec6
tree264e68c8555d8509a5ac27f01eed5e6c69940174
parent9225baef71407d799a6f7f563b77fd7f82791416
ggml : add NUMA support (#1556)

* detect NUMA systems and pin work threads to nodes (linux)

* disable mmap prefetch/readahead for NUMA systems

* avoid sending finalize op to thread pool if it does nothing

* silence robot

* fix args

* make --numa a param

* recommendation that n_nodes evenly divide n_threads did not warrant such aggressive enforcement

* lower synchronization overhead

* statically allocate

* move numa state to g_state

* add description for --numa

* ggml : minor style changes

* ggml : minor style + try fix sanitizer build

* llama : allow to initialize backend with NUMA support

* llama : avoid ggml include in llama-util.h

* ggml : style / formatting

* ggml : fix handling of ops with n_threads > n_tasks > 1

* server : utilize numa parameter

---------

Co-authored-by: Georgi Gerganov <redacted>
14 files changed:
examples/common.cpp
examples/common.h
examples/embedding/embedding.cpp
examples/main/README.md
examples/main/main.cpp
examples/perplexity/perplexity.cpp
examples/quantize/quantize.cpp
examples/server/server.cpp
examples/simple/simple.cpp
ggml.c
ggml.h
llama-util.h
llama.cpp
llama.h