File tree 4 files changed +45
-2
lines changed
4 files changed +45
-2
lines changed Original file line number Diff line number Diff line change @@ -749,9 +749,9 @@ endif()
749
749
750
750
if (EXECUTORCH_BUILD_PTHREADPOOL
751
751
AND EXECUTORCH_BUILD_CPUINFO
752
- AND CMAKE_CXX_STANDARD GREATER_EQUAL 14
753
752
)
754
753
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /extension/threadpool)
754
+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /extension/parallel)
755
755
endif ()
756
756
757
757
if (EXECUTORCH_BUILD_PYBIND)
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ excludes = [
73
73
deps = [
74
74
" executorch" ,
75
75
" executorch_core" ,
76
+ " extension_parallel" ,
76
77
" extension_threadpool" ,
77
78
" portable_kernels" ,
78
79
]
@@ -115,6 +116,7 @@ excludes = [
115
116
deps = [
116
117
" executorch_core" ,
117
118
" executorch" ,
119
+ " extension_parallel" ,
118
120
]
119
121
120
122
[targets .optimized_native_cpu_ops ]
@@ -129,6 +131,8 @@ excludes = [
129
131
deps = [
130
132
" executorch_core" ,
131
133
" executorch" ,
134
+ " extension_parallel" ,
135
+ " extension_threadpool" ,
132
136
" portable_kernels" ,
133
137
]
134
138
# ---------------------------------- core end ----------------------------------
@@ -208,6 +212,19 @@ deps = [
208
212
" extension_runner_util" ,
209
213
]
210
214
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
+
211
228
[targets .extension_tensor ]
212
229
buck_targets = [
213
230
" //extension/tensor:tensor" ,
@@ -395,6 +412,7 @@ deps = [
395
412
" executorch" ,
396
413
" executorch_core" ,
397
414
" optimized_kernels" ,
415
+ " extension_parallel" ,
398
416
" extension_threadpool" ,
399
417
" xnnpack_backend" ,
400
418
]
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()
43
43
list (TRANSFORM _optimized_cpublas__srcs PREPEND "${EXECUTORCH_ROOT} /" )
44
44
add_library (cpublas STATIC ${_optimized_cpublas__srcs} )
45
45
target_link_libraries (
46
- cpublas PRIVATE executorch_core eigen_blas extension_threadpool
46
+ cpublas PRIVATE executorch_core eigen_blas extension_parallel extension_threadpool
47
47
)
48
48
target_compile_options (cpublas PUBLIC ${_common_compile_options} )
49
49
You can’t perform that action at this time.
0 commit comments