From: Erik Scholz Date: Tue, 27 Jun 2023 17:06:33 +0000 (+0200) Subject: fix pthreads setaffinity usage on android (#2020) X-Git-Tag: gguf-v0.4.0~551 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=9d23589d638dc74577d5ff880e6d4248b795f12e;p=pkg%2Fggml%2Fsources%2Fllama.cpp fix pthreads setaffinity usage on android (#2020) --- diff --git a/ggml.c b/ggml.c index 92faf03f..684caaa3 100644 --- a/ggml.c +++ b/ggml.c @@ -16684,7 +16684,8 @@ typedef pthread_t ggml_thread_t; #endif -#ifdef __linux__ +// Android's libc implementation "bionic" does not support setting affinity +#if defined(__linux__) && !defined(__BIONIC__) void set_numa_thread_affinity(int thread_n, int n_threads) { if (!ggml_is_numa()) { return;