瀏覽代碼

fix pthreads setaffinity usage on android (#2020)

Erik Scholz 2 年之前
父節點
當前提交
9d23589d63
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      ggml.c

+ 2 - 1
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;