Skip to content

Commit 05d3ac4

Browse files
committed
[Executorch][llama] Make pthreadpool not use GCD on apple platforms
My local M1 runs reveal that GCG was not great as a threadpool Differential Revision: [D55712512](https://our.internmc.facebook.com/intern/diff/D55712512/) [ghstack-poisoned]
1 parent be618c2 commit 05d3ac4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,11 @@ if(EXECUTORCH_BUILD_PTHREADPOOL)
224224
set(PTHREADPOOL_ALLOW_DEPRECATED_API
225225
ON
226226
CACHE BOOL "")
227+
if(APPLE)
228+
set(PTHREADPOOL_SYNC_PRIMITIVE
229+
"condvar"
230+
CACHE STRING "")
231+
endif()
227232
add_subdirectory("${PTHREADPOOL_SOURCE_DIR}")
228233
endif()
229234

0 commit comments

Comments
 (0)