File tree Expand file tree Collapse file tree 4 files changed +54
-1
lines changed Expand file tree Collapse file tree 4 files changed +54
-1
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,13 @@ if(NOT BUCK2)
129
129
set (BUCK2 buck2 )
130
130
endif ()
131
131
132
+ # Build dataloader library
133
+ option (EXECUTORCH_BUILD_EXTENSION_RUNNER_MODULE
134
+ "Build the extension/runner/module directory" OFF )
135
+ if (NOT BUCK2 )
136
+ set (BUCK2 buck2 )
137
+ endif ()
138
+
132
139
if (NOT PYTHON_EXECUTABLE )
133
140
set (PYTHON_EXECUTABLE python3 )
134
141
endif ()
@@ -311,6 +318,10 @@ if(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER)
311
318
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /extension/data_loader )
312
319
endif ()
313
320
321
+ if (EXECUTORCH_BUILD_EXTENSION_RUNNER_MODULE )
322
+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /extension/runner/module )
323
+ endif ()
324
+
314
325
option (EXECUTORCH_BUILD_XNNPACK "Build the backends/xnnpack directory" OFF )
315
326
if (EXECUTORCH_BUILD_XNNPACK )
316
327
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/xnnpack )
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ COREML=OFF
21
21
MPS=OFF
22
22
XNNPACK=OFF
23
23
HEADERS_PATH=" include"
24
- EXECUTORCH_FRAMEWORK=" executorch:libexecutorch.a,libextension_data_loader.a:$HEADERS_PATH "
24
+ EXECUTORCH_FRAMEWORK=" executorch:libexecutorch.a,libextension_data_loader.a,libextension_runner_module.a :$HEADERS_PATH "
25
25
PORTABLE_FRAMEWORK=" portable_backend:libportable_kernels.a,libportable_ops_lib.a:"
26
26
COREML_FRAMEWORK=" coreml_backend:libcoremldelegate.a:"
27
27
MPS_FRAMEWORK=" mps_backend:libmpsdelegate.a:"
@@ -112,6 +112,7 @@ cmake_build() {
112
112
-DPYTHON_EXECUTABLE=" $PYTHON " \
113
113
-DFLATC_EXECUTABLE=" $FLATC " \
114
114
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
115
+ -DEXECUTORCH_BUILD_EXTENSION_RUNNER_MODULE=ON \
115
116
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=" $( pwd) " \
116
117
-DIOS_DEPLOYMENT_TARGET=" $IOS_DEPLOYMENT_TARGET " \
117
118
-DEXECUTORCH_BUILD_COREML=$COREML \
Original file line number Diff line number Diff line change @@ -52,6 +52,18 @@ deps = [
52
52
" executorch" ,
53
53
]
54
54
55
+ [targets .extension_runner_module ]
56
+ buck_targets = [
57
+ " //extension/runner/module:module" ,
58
+ ]
59
+ filters = [
60
+ " .cpp$" ,
61
+ ]
62
+ deps = [
63
+ " executorch" ,
64
+ " extension_data_loader" ,
65
+ ]
66
+
55
67
[targets .portable_kernels ]
56
68
buck_targets = [
57
69
# //kernels/portable:operators would be more appropriate, but buck2 doesn't
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 this file formatted by running:
8
+ # ~~~
9
+ # cmake-format --first-comment-is-literal=True CMakeLists.txt
10
+ # ~~~
11
+
12
+ cmake_minimum_required (VERSION 3.19 )
13
+
14
+ # Source root directory for executorch.
15
+ if (NOT EXECUTORCH_ROOT )
16
+ set (EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR} /../.. )
17
+ endif ()
18
+
19
+ list (TRANSFORM _extension_runner_module__srcs PREPEND "${EXECUTORCH_ROOT} /" )
20
+ add_library (extension_runner_module ${_extension_runner_module__srcs} )
21
+ target_include_directories (extension_runner_module PUBLIC ${EXECUTORCH_ROOT} /.. )
22
+
23
+
24
+ # Install libraries
25
+ install (
26
+ TARGETS extension_runner_module
27
+ DESTINATION ${CMAKE_BINARY_DIR} /lib
28
+ INCLUDES
29
+ DESTINATION ${_common_include_directories} )
You can’t perform that action at this time.
0 commit comments