Skip to content

Commit 9d23589

Browse files
authored
fix pthreads setaffinity usage on android (#2020)
1 parent 0be54f7 commit 9d23589

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ggml.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16684,7 +16684,8 @@ typedef pthread_t ggml_thread_t;
1668416684

1668516685
#endif
1668616686

16687-
#ifdef __linux__
16687+
// Android's libc implementation "bionic" does not support setting affinity
16688+
#if defined(__linux__) && !defined(__BIONIC__)
1668816689
void set_numa_thread_affinity(int thread_n, int n_threads) {
1668916690
if (!ggml_is_numa()) {
1669016691
return;

0 commit comments

Comments
 (0)