File tree 7 files changed +6
-8
lines changed
7 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -141,3 +141,6 @@ if(TARGET cpublas)
141
141
cpublas PROPERTIES INTERFACE_LINK_LIBRARIES extension_parallel
142
142
)
143
143
endif ()
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()
131
131
set (XNNPACK_ROOT ${CMAKE_CURRENT_SOURCE_DIR} /../../../backends/xnnpack)
132
132
# Extra compile option and include dir for pthreadpool
133
133
if (EXECUTORCH_BUILD_PTHREADPOOL)
134
- list (APPEND _common_compile_options -DET_USE_THREADPOOL)
135
134
list (APPEND link_libraries extension_threadpool pthreadpool)
136
135
list (APPEND _common_include_directories
137
136
${XNNPACK_ROOT} /third-party/pthreadpool/include
Original file line number Diff line number Diff line change @@ -130,7 +130,6 @@ endif()
130
130
set (XNNPACK_ROOT ${CMAKE_CURRENT_SOURCE_DIR} /../../../backends/xnnpack)
131
131
# Extra compile option and include dir for pthreadpool
132
132
if (EXECUTORCH_BUILD_PTHREADPOOL)
133
- list (APPEND _common_compile_options -DET_USE_THREADPOOL)
134
133
list (APPEND link_libraries extension_threadpool pthreadpool)
135
134
list (APPEND _common_include_directories
136
135
${XNNPACK_ROOT} /third-party/pthreadpool/include
Original file line number Diff line number Diff line change @@ -7,9 +7,6 @@ def define_common_targets():
7
7
"main.cpp" ,
8
8
],
9
9
compiler_flags = ["-Wno-global-constructors" ],
10
- preprocessor_flags = [
11
- "-DET_USE_THREADPOOL" ,
12
- ],
13
10
deps = [
14
11
"//executorch/examples/models/llava/runner:runner" ,
15
12
"//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)
119
119
endif ()
120
120
121
121
if (TARGET pthreadpool)
122
- target_compile_definitions (executorch_jni PRIVATE ET_USE_THREADPOOL=1)
123
122
target_include_directories (
124
123
executorch_jni
125
124
PUBLIC
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ target_include_directories(
78
78
target_link_libraries (custom_ops PUBLIC ${custom_ops_libs} executorch_core)
79
79
80
80
target_compile_options (
81
- custom_ops PUBLIC ${_common_compile_options} -DET_USE_THREADPOOL
81
+ custom_ops PUBLIC ${_common_compile_options}
82
82
)
83
83
84
84
install (TARGETS custom_ops DESTINATION lib)
@@ -130,7 +130,7 @@ if(EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT)
130
130
target_compile_options (
131
131
custom_ops_aot_lib
132
132
PUBLIC -Wno-deprecated-declarations -fPIC -frtti -fexceptions
133
- ${_common_compile_options} -DET_USE_THREADPOOL
133
+ ${_common_compile_options}
134
134
)
135
135
136
136
install (TARGETS custom_ops_aot_lib
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ target_include_directories(
32
32
PUBLIC ${EXECUTORCH_ROOT} /backends/xnnpack/third-party/cpuinfo/include
33
33
${EXECUTORCH_ROOT} /backends/xnnpack/third-party/pthreadpool/include
34
34
)
35
+ target_compile_definitions (extension_threadpool PUBLIC ET_USE_THREADPOOL)
35
36
target_compile_options (extension_threadpool PUBLIC ${_common_compile_options} )
36
37
37
38
# Install libraries
You can’t perform that action at this time.
0 commit comments