summaryrefslogtreecommitdiff
path: root/llama.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llama.cpp')
-rw-r--r--llama.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/llama.cpp b/llama.cpp
index aceb9c25..08e7b02b 100644
--- a/llama.cpp
+++ b/llama.cpp
@@ -1034,7 +1034,7 @@ struct llama_mmap {
int fd = fileno(file->fp);
int flags = MAP_SHARED;
// prefetch/readahead impairs performance on NUMA systems
- if (numa) { prefetch = 0; }
+ if (numa) { prefetch = 0; }
#ifdef __linux__
// advise the kernel to read the file sequentially (increases readahead)
if (posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL)) {
@@ -11182,7 +11182,7 @@ bool llama_mlock_supported(void) {
return llama_supports_mlock();
}
-void llama_backend_init(bool numa) {
+void llama_backend_init(void) {
ggml_time_init();
// needed to initialize f16 tables
@@ -11192,15 +11192,17 @@ void llama_backend_init(bool numa) {
ggml_free(ctx);
}
- if (numa) {
- ggml_numa_init();
- }
-
#ifdef GGML_USE_MPI
ggml_mpi_backend_init();
#endif
}
+void llama_numa_init(enum ggml_numa_strategy numa) {
+ if (numa != GGML_NUMA_STRATEGY_DISABLED) {
+ ggml_numa_init(numa);
+ }
+}
+
void llama_backend_free(void) {
#ifdef GGML_USE_MPI
ggml_mpi_backend_free();