Skip to content

Commit 923f2d5

Browse files
kimishpatelfacebook-github-bot
authored andcommitted
Make pthreadpool not use GCD on apple platforms (#2839)
Summary: Pull Request resolved: #2839 My local M1 runs reveal that GCG was not great as a threadpool Reviewed By: digantdesai, iseeyuan Differential Revision: D55712512 fbshipit-source-id: 10e7bc6782dbfcfe0b8cea3cb801fe4ef6706b9d
1 parent 077e403 commit 923f2d5

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)