File tree Expand file tree Collapse file tree 4 files changed +48
-3
lines changed Expand file tree Collapse file tree 4 files changed +48
-3
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,7 @@ option(REGISTER_QUANTIZED_OPS
9292option (BUILD_SELECTIVE_BUILD_TEST
9393 "Whether to build binary for demo selective build" OFF )
9494
95- option (EXECUTORCH_BUILD_SIZE_TEST
96- "Whether to build size test" OFF )
95+ option (EXECUTORCH_BUILD_SIZE_TEST "Whether to build size test" OFF )
9796
9897if (BUILD_SELECTIVE_BUILD_TEST)
9998 option (SELECT_ALL_OPS
@@ -290,7 +289,13 @@ if(EXECUTORCH_BUILD_EXECUTOR_RUNNER)
290289 target_compile_options (executor_runner PUBLIC ${_common_compile_options} )
291290endif ()
292291
293- # Add XNNPACK subdirectory
292+ option (EXECUTORCH_BUILD_EXTENSION_DATA_LOADER
293+ "Build the extension/data_loader directory" OFF )
294+ if (EXECUTORCH_BUILD_EXTENSION_DATA_LOADER)
295+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /extension/data_loader)
296+ endif ()
297+
298+ option (EXECUTORCH_BUILD_XNNPACK "Build the backends/xnnpack directory" OFF )
294299if (EXECUTORCH_BUILD_XNNPACK)
295300 add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/xnnpack)
296301endif ()
Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ function(executorch_print_configuration_summary)
4040 )
4141 message (
4242 STATUS " REGISTER_EXAMPLE_CUSTOM_OPS : ${REGISTER_EXAMPLE_CUSTOM_OPS} " )
43+ message (
44+ STATUS
45+ " EXECUTORCH_BUILD_EXTENSION_DATA_LOADER : ${EXECUTORCH_BUILD_EXTENSION_DATA_LOADER} "
46+ )
47+ message (STATUS " EXECUTORCH_BUILD_XNNPACK : ${EXECUTORCH_BUILD_XNNPACK} " )
4348endfunction ()
4449
4550# This is the funtion to use -Wl, --whole-archive to link static library NB:
Original file line number Diff line number Diff line change @@ -118,3 +118,17 @@ deps = [
118118 " xnnpack_backend" ,
119119 " portable_kernels" ,
120120]
121+
122+ [targets .extension_data_loader ]
123+ buck_targets = [
124+ " //extension/data_loader:buffer_data_loader" ,
125+ " //extension/data_loader:file_data_loader" ,
126+ " //extension/data_loader:mmap_data_loader" ,
127+ " //extension/data_loader:shared_ptr_data_loader" ,
128+ ]
129+ filters = [
130+ " .cpp$" ,
131+ ]
132+ deps = [
133+ " executorch" ,
134+ ]
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_data_loader__srcs PREPEND "${EXECUTORCH_ROOT} /" )
20+ add_library (extension_data_loader ${_extension_data_loader__srcs} )
21+ target_include_directories (extension_data_loader PUBLIC ${EXECUTORCH_ROOT} /..)
You can’t perform that action at this time.
0 commit comments