From 9ce20a1170e9ed2ce51309c7f88e1341f66e2722 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Tue, 27 Jun 2023 15:54:51 +0200 Subject: [PATCH] fix pthreads setaffinity usage on android --- ggml.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ggml.c b/ggml.c index 92faf03f7..684caaa37 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;