File tree Expand file tree Collapse file tree 7 files changed +6
-8
lines changed Expand file tree Collapse file tree 7 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -141,3 +141,6 @@ if(TARGET cpublas)
141141 cpublas PROPERTIES INTERFACE_LINK_LIBRARIES extension_parallel
142142 )
143143endif ()
144+ if (TARGET extension_threadpool)
145+ target_compile_definitions (extension_threadpool INTERFACE ET_USE_THREADPOOL)
146+ endif ()
Original file line number Diff line number Diff line change @@ -131,7 +131,6 @@ endif()
131131set (XNNPACK_ROOT ${CMAKE_CURRENT_SOURCE_DIR} /../../../backends/xnnpack)
132132# Extra compile option and include dir for pthreadpool
133133if (EXECUTORCH_BUILD_PTHREADPOOL)
134- list (APPEND _common_compile_options -DET_USE_THREADPOOL)
135134 list (APPEND link_libraries extension_threadpool pthreadpool)
136135 list (APPEND _common_include_directories
137136 ${XNNPACK_ROOT} /third-party/pthreadpool/include
Original file line number Diff line number Diff line change @@ -130,7 +130,6 @@ endif()
130130set (XNNPACK_ROOT ${CMAKE_CURRENT_SOURCE_DIR} /../../../backends/xnnpack)
131131# Extra compile option and include dir for pthreadpool
132132if (EXECUTORCH_BUILD_PTHREADPOOL)
133- list (APPEND _common_compile_options -DET_USE_THREADPOOL)
134133 list (APPEND link_libraries extension_threadpool pthreadpool)
135134 list (APPEND _common_include_directories
136135 ${XNNPACK_ROOT} /third-party/pthreadpool/include
Original file line number Diff line number Diff line change @@ -7,9 +7,6 @@ def define_common_targets():
77 "main.cpp" ,
88 ],
99 compiler_flags = ["-Wno-global-constructors" ],
10- preprocessor_flags = [
11- "-DET_USE_THREADPOOL" ,
12- ],
1310 deps = [
1411 "//executorch/examples/models/llava/runner:runner" ,
1512 "//executorch/extension/evalue_util:print_evalue" ,
Original file line number Diff line number Diff line change @@ -119,7 +119,6 @@ if(EXECUTORCH_BUILD_KERNELS_CUSTOM)
119119endif ()
120120
121121if (TARGET pthreadpool)
122- target_compile_definitions (executorch_jni PRIVATE ET_USE_THREADPOOL=1)
123122 target_include_directories (
124123 executorch_jni
125124 PUBLIC
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ target_include_directories(
7878target_link_libraries (custom_ops PUBLIC ${custom_ops_libs} executorch_core)
7979
8080target_compile_options (
81- custom_ops PUBLIC ${_common_compile_options} -DET_USE_THREADPOOL
81+ custom_ops PUBLIC ${_common_compile_options}
8282)
8383
8484install (TARGETS custom_ops DESTINATION lib)
@@ -130,7 +130,7 @@ if(EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT)
130130 target_compile_options (
131131 custom_ops_aot_lib
132132 PUBLIC -Wno-deprecated-declarations -fPIC -frtti -fexceptions
133- ${_common_compile_options} -DET_USE_THREADPOOL
133+ ${_common_compile_options}
134134 )
135135
136136 install (TARGETS custom_ops_aot_lib
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ target_include_directories(
3232 PUBLIC ${EXECUTORCH_ROOT} /backends/xnnpack/third-party/cpuinfo/include
3333 ${EXECUTORCH_ROOT} /backends/xnnpack/third-party/pthreadpool/include
3434)
35+ target_compile_definitions (extension_threadpool PUBLIC ET_USE_THREADPOOL)
3536target_compile_options (extension_threadpool PUBLIC ${_common_compile_options} )
3637
3738# Install libraries
You can’t perform that action at this time.
0 commit comments