summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorbmwl <brian.marshall@tolko.com>2024-02-16 01:31:07 -0800
committerGitHub <noreply@github.com>2024-02-16 11:31:07 +0200
commitf486f6e1e5e9d01603d9325ab3e05f1edb362a95 (patch)
tree370aeba4b6b5f01ec2137e82484013d1be82061e /tests
parent60ed04cf82dc91ade725dd7ad53f0ee81f76eccf (diff)
ggml : add numa options (#5377)
* Added numa options to allow finer grained control as well as plumbing for a new mirror mode that will require numa.h * Reverted Makefile * Fixed include * Removed sched.h from ggml.h, moved ggml_get_numa_affinity into ggml.c, removed trailing whitespace and fixed up a few inconsistent variables * removed trailing whitespace * Added numa options to allow finer grained control as well as plumbing for a new mirror mode that will require numa.h * Reverting Makefile * Fixed a number of issues with the move from BOOL to ggml_numa_strategies. Added a note about mirror mode note being implemented yet * Removing MIRROR_MODE code for this PR * Removing last bit of MIRROR_MODE code for this PR * Removing unneeded branch in server.cpp example and moving get_numa_affinity and making it static * Fixed lingering init_llama_backend() bool calls in tests and examples * Remote enum llama_numa_strategies * Revert bad merge with dynatemp flags * add missing enum ggml_numa_strategies declaration and revert sync problem with master * add missing enum ggml_numa_strategies declaration * fixed ggml_init_numa variable * Update ggml.h Co-authored-by: Jared Van Bortel <cebtenzzre@gmail.com> * Update READMEs with info about numa flags, change INTERLEAVE strategy name to DISTRIBUTE everywhere, implement the improved distribution strategy from @rankaiyx, fix a spelling mistake and un-merge some bad merges * split numa init out from llama_backend_init and created llama_numa_init. Updated all code paths and samples * Fix up some boolean vs enum comparisons * Added #ifdefs for non-Linux OS that don't have cpu_set_t datatype * Update ggml.h Align enum values Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> * Update ggml.c Remove whitespace Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> * Update ggml.c align paremeters Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> * Update examples/server/server.cpp remove whitespace and align brace Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> * Update common/common.cpp Remove whitespace and align brace Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> * unified ggml_numa_strategy enum and fixed text alignment in server.cpp example * Update ggml.c simplified return for platforms without NUMA support Co-authored-by: Jared Van Bortel <cebtenzzre@gmail.com> * removed redundant else from cli argument processing of --numa * whitespace --------- Co-authored-by: root <root@nenya.lothlorien.ca> Co-authored-by: Jared Van Bortel <cebtenzzre@gmail.com> Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> Co-authored-by: Jared Van Bortel <jared@nomic.ai>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-autorelease.cpp2
-rw-r--r--tests/test-model-load-cancel.cpp2
-rw-r--r--tests/test-tokenizer-0-falcon.cpp2
-rw-r--r--tests/test-tokenizer-0-llama.cpp2
-rw-r--r--tests/test-tokenizer-1-bpe.cpp2
-rw-r--r--tests/test-tokenizer-1-llama.cpp2
6 files changed, 6 insertions, 6 deletions
diff --git a/tests/test-autorelease.cpp b/tests/test-autorelease.cpp
index 36a23c0b..57fa0001 100644
--- a/tests/test-autorelease.cpp
+++ b/tests/test-autorelease.cpp
@@ -12,7 +12,7 @@ int main(int argc, char ** argv) {
auto * model_path = get_model_or_exit(argc, argv);
std::thread([&model_path]() {
- llama_backend_init(false);
+ llama_backend_init();
auto * model = llama_load_model_from_file(model_path, llama_model_default_params());
auto * ctx = llama_new_context_with_model(model, llama_context_default_params());
llama_free(ctx);
diff --git a/tests/test-model-load-cancel.cpp b/tests/test-model-load-cancel.cpp
index 7ea4bbac..858535c3 100644
--- a/tests/test-model-load-cancel.cpp
+++ b/tests/test-model-load-cancel.cpp
@@ -14,7 +14,7 @@ int main(int argc, char *argv[] ) {
fprintf(stderr, "using '%s'\n", model_path);
fclose(file);
- llama_backend_init(false);
+ llama_backend_init();
auto params = llama_model_params{};
params.use_mmap = false;
params.progress_callback = [](float progress, void * ctx){
diff --git a/tests/test-tokenizer-0-falcon.cpp b/tests/test-tokenizer-0-falcon.cpp
index a4e9d2b9..472b0b3a 100644
--- a/tests/test-tokenizer-0-falcon.cpp
+++ b/tests/test-tokenizer-0-falcon.cpp
@@ -61,7 +61,7 @@ int main(int argc, char **argv) {
llama_model * model;
llama_context * ctx;
- llama_backend_init(false);
+ llama_backend_init();
// load the vocab
{
diff --git a/tests/test-tokenizer-0-llama.cpp b/tests/test-tokenizer-0-llama.cpp
index 39c8d188..0a16cd7e 100644
--- a/tests/test-tokenizer-0-llama.cpp
+++ b/tests/test-tokenizer-0-llama.cpp
@@ -60,7 +60,7 @@ int main(int argc, char **argv) {
llama_model * model;
llama_context * ctx;
- llama_backend_init(false);
+ llama_backend_init();
// load the vocab
{
diff --git a/tests/test-tokenizer-1-bpe.cpp b/tests/test-tokenizer-1-bpe.cpp
index 3bb62956..3596ce55 100644
--- a/tests/test-tokenizer-1-bpe.cpp
+++ b/tests/test-tokenizer-1-bpe.cpp
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
llama_model * model;
llama_context * ctx;
- llama_backend_init(false);
+ llama_backend_init();
// load the vocab
{
diff --git a/tests/test-tokenizer-1-llama.cpp b/tests/test-tokenizer-1-llama.cpp
index b0d814a4..9333f868 100644
--- a/tests/test-tokenizer-1-llama.cpp
+++ b/tests/test-tokenizer-1-llama.cpp
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
llama_model * model;
llama_context * ctx;
- llama_backend_init(false);
+ llama_backend_init();
// load the vocab
{