Skip to content

Commit

Permalink
Enable setting thread affinity on NUMA systems
Browse files Browse the repository at this point in the history
  • Loading branch information
jart committed Jan 8, 2024
1 parent bb136e1 commit d39ec38
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions llama.cpp/ggml.c
Expand Up @@ -16185,7 +16185,6 @@ typedef pthread_t ggml_thread_t;
#endif

// Android's libc implementation "bionic" does not support setting affinity
#if defined(__linux__) && !defined(__BIONIC__)
static void set_numa_thread_affinity(int thread_n, int n_threads) {
if (!ggml_is_numa()) {
return;
Expand Down Expand Up @@ -16232,12 +16231,6 @@ static void clear_numa_thread_affinity(void) {

CPU_FREE(cpus);
}
#else
// TODO: Windows etc.
// (the linux implementation may also work on BSD, someone should test)
static void set_numa_thread_affinity(int thread_n, int n_threads) { UNUSED(thread_n); UNUSED(n_threads); }
static void clear_numa_thread_affinity(void) {}
#endif

struct ggml_compute_state_shared {
const struct ggml_cgraph * cgraph;
Expand Down

0 comments on commit d39ec38

Please sign in to comment.