File tree Expand file tree Collapse file tree 4 files changed +45
-2
lines changed
Expand file tree Collapse file tree 4 files changed +45
-2
lines changed Original file line number Diff line number Diff line change @@ -749,9 +749,9 @@ endif()
749749
750750if (EXECUTORCH_BUILD_PTHREADPOOL
751751 AND EXECUTORCH_BUILD_CPUINFO
752- AND CMAKE_CXX_STANDARD GREATER_EQUAL 14
753752)
754753 add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /extension/threadpool)
754+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /extension/parallel)
755755endif ()
756756
757757if (EXECUTORCH_BUILD_PYBIND)
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ excludes = [
7373deps = [
7474 " executorch" ,
7575 " executorch_core" ,
76+ " extension_parallel" ,
7677 " extension_threadpool" ,
7778 " portable_kernels" ,
7879]
@@ -115,6 +116,7 @@ excludes = [
115116deps = [
116117 " executorch_core" ,
117118 " executorch" ,
119+ " extension_parallel" ,
118120]
119121
120122[targets .optimized_native_cpu_ops ]
@@ -129,6 +131,8 @@ excludes = [
129131deps = [
130132 " executorch_core" ,
131133 " executorch" ,
134+ " extension_parallel" ,
135+ " extension_threadpool" ,
132136 " portable_kernels" ,
133137]
134138# ---------------------------------- core end ----------------------------------
@@ -208,6 +212,19 @@ deps = [
208212 " extension_runner_util" ,
209213]
210214
215+ [targets .extension_parallel ]
216+ buck_targets = [
217+ " //extension/parallel:thread_parallel" ,
218+ ]
219+ filters = [
220+ " .cpp$" ,
221+ ]
222+ deps = [
223+ " executorch" ,
224+ " executorch_core" ,
225+ " extension_threadpool" ,
226+ ]
227+
211228[targets .extension_tensor ]
212229buck_targets = [
213230 " //extension/tensor:tensor" ,
@@ -395,6 +412,7 @@ deps = [
395412 " executorch" ,
396413 " executorch_core" ,
397414 " optimized_kernels" ,
415+ " extension_parallel" ,
398416 " extension_threadpool" ,
399417 " xnnpack_backend" ,
400418]
Original file line number Diff line number Diff line change 1+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2+ # All rights reserved.
3+ #
4+ # This source code is licensed under the BSD-style license found in the
5+ # LICENSE file in the root directory of this source tree.
6+
7+ # Please keep this file formatted by running:
8+ # ~~~
9+ # cmake-format -i CMakeLists.txt
10+ # ~~~
11+
12+ if (NOT (EXECUTORCH_BUILD_PTHREADPOOL AND EXECUTORCH_BUILD_CPUINFO))
13+ message (FATAL_ERROR "extension/parallel requires extension/threadpool" )
14+ endif ()
15+
16+ add_library (extension_parallel thread_parallel.cpp)
17+
18+ target_link_libraries (extension_parallel PUBLIC executorch_core extension_threadpool)
19+ target_compile_options (extension_parallel PUBLIC ${_common_compile_options} )
20+
21+ install (
22+ TARGETS extension_parallel
23+ DESTINATION lib
24+ INCLUDES
25+ DESTINATION ${_common_include_directories} )
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ endif()
4343list (TRANSFORM _optimized_cpublas__srcs PREPEND "${EXECUTORCH_ROOT} /" )
4444add_library (cpublas STATIC ${_optimized_cpublas__srcs} )
4545target_link_libraries (
46- cpublas PRIVATE executorch_core eigen_blas extension_threadpool
46+ cpublas PRIVATE executorch_core eigen_blas extension_parallel extension_threadpool
4747)
4848target_compile_options (cpublas PUBLIC ${_common_compile_options} )
4949
You can’t perform that action at this time.
0 commit comments