Skip to content

Commit 6eebdd1

Browse files
committed
move simple options
1 parent bbd11ec commit 6eebdd1

File tree

5 files changed

+151
-156
lines changed

5 files changed

+151
-156
lines changed

CMakeLists.txt

+2-70
Original file line numberDiff line numberDiff line change
@@ -128,74 +128,6 @@ else()
128128
set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE}")
129129
endif()
130130

131-
option(EXECUTORCH_BUILD_ARM_BAREMETAL
132-
"Build the Arm Baremetal flow for Cortex-M and Ethos-U" OFF
133-
)
134-
135-
option(EXECUTORCH_BUILD_KERNELS_CUSTOM "Build the custom kernels" OFF)
136-
137-
option(EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT "Build the custom ops lib for AOT"
138-
OFF
139-
)
140-
141-
option(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER "Build the Data Loader extension"
142-
OFF
143-
)
144-
145-
option(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR "Build the Flat Tensor extension"
146-
OFF
147-
)
148-
149-
option(EXECUTORCH_BUILD_EXTENSION_LLM "Build the LLM extension"
150-
OFF
151-
)
152-
153-
option(EXECUTORCH_BUILD_EXTENSION_MODULE "Build the Module extension" OFF)
154-
155-
option(EXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL "Build the Runner Util extension"
156-
OFF
157-
)
158-
159-
option(EXECUTORCH_BUILD_EXTENSION_TENSOR "Build the Tensor extension" OFF)
160-
161-
option(EXECUTORCH_BUILD_EXTENSION_TRAINING "Build the training extension" OFF)
162-
163-
option(EXECUTORCH_BUILD_MPS "Build the MPS backend" OFF)
164-
165-
option(EXECUTORCH_BUILD_NEURON "Build the backends/mediatek directory" OFF)
166-
167-
option(EXECUTORCH_BUILD_OPENVINO "Build the Openvino backend" OFF)
168-
169-
option(EXECUTORCH_BUILD_PYBIND "Build the Python Bindings" OFF)
170-
171-
option(EXECUTORCH_BUILD_QNN "Build the Qualcomm backend" OFF)
172-
173-
option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED "Build the optimized kernels" OFF)
174-
175-
option(EXECUTORCH_BUILD_KERNELS_QUANTIZED "Build the quantized kernels" OFF)
176-
177-
option(EXECUTORCH_BUILD_DEVTOOLS "Build the ExecuTorch Developer Tools")
178-
179-
option(EXECUTORCH_BUILD_TESTS "Build CMake-based unit tests" OFF)
180-
181-
option(EXECUTORCH_NNLIB_OPT "Build Cadence backend Hifi nnlib kernel" OFF)
182-
183-
option(EXECUTORCH_CADENCE_CPU_RUNNER "Build Cadence backend CPU runner" OFF)
184-
185-
option(EXECUTORCH_BUILD_SIZE_TEST "Build the size test" OFF)
186-
187-
option(EXECUTORCH_BUILD_XNNPACK "Build the XNNPACK backend" OFF)
188-
189-
option(EXECUTORCH_BUILD_VULKAN "Build the Vulkan backend" OFF)
190-
191-
option(BUILD_EXECUTORCH_PORTABLE_OPS "Build portable_ops library" ON)
192-
193-
option(EXECUTORCH_USE_DL "Use libdl library" ON)
194-
195-
option(EXECUTORCH_BUILD_CADENCE "Build the Cadence DSP backend" OFF)
196-
197-
option(EXECUTORCH_BUILD_CORTEX_M "Build the Cortex-M backend" OFF)
198-
199131
#
200132
# pthreadpool: build pthreadpool library. Disable on unsupported platforms
201133
#
@@ -507,7 +439,7 @@ if(EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
507439
find_package_torch_headers()
508440
endif()
509441

510-
if(BUILD_EXECUTORCH_PORTABLE_OPS)
442+
if(EXECUTORCH_BUILD_PORTABLE_OPS)
511443
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/kernels/portable)
512444
endif()
513445

@@ -520,7 +452,7 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/configurations)
520452
#
521453
# gflags: Commandline flag host library.
522454
#
523-
option(EXECUTORCH_BUILD_GFLAGS "Build the gflags library." ON)
455+
524456
if(EXECUTORCH_BUILD_GFLAGS)
525457
add_subdirectory(third-party/gflags)
526458
endif()

backends/cadence/build_cadence_fusionG3.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if $STEPWISE_BUILD; then
4646
-DEXECUTORCH_ENABLE_LOGGING=ON \
4747
-DEXECUTORCH_ENABLE_PROGRAM_VERIFICATION=ON \
4848
-DEXECUTORCH_USE_DL=OFF \
49-
-DBUILD_EXECUTORCH_PORTABLE_OPS=ON \
49+
-DEXECUTORCH_BUILD_PORTABLE_OPS=ON \
5050
-DEXECUTORCH_BUILD_KERNELS_CUSTOM=OFF \
5151
-DPYTHON_EXECUTABLE=python3 \
5252
-DEXECUTORCH_FUSION_G3_OPT=ON \
@@ -72,7 +72,7 @@ else
7272
-DEXECUTORCH_ENABLE_LOGGING=ON \
7373
-DEXECUTORCH_ENABLE_PROGRAM_VERIFICATION=ON \
7474
-DEXECUTORCH_USE_DL=OFF \
75-
-DBUILD_EXECUTORCH_PORTABLE_OPS=ON \
75+
-DEXECUTORCH_BUILD_PORTABLE_OPS=ON \
7676
-DEXECUTORCH_BUILD_KERNELS_CUSTOM=OFF \
7777
-DPYTHON_EXECUTABLE=python3 \
7878
-DEXECUTORCH_FUSION_G3_OPT=ON \

backends/cadence/build_cadence_hifi4.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ if $STEPWISE_BUILD; then
4545
-DEXECUTORCH_ENABLE_LOGGING=ON \
4646
-DEXECUTORCH_ENABLE_PROGRAM_VERIFICATION=ON \
4747
-DEXECUTORCH_USE_DL=OFF \
48-
-DBUILD_EXECUTORCH_PORTABLE_OPS=ON \
48+
-DEXECUTORCH_BUILD_PORTABLE_OPS=ON \
4949
-DEXECUTORCH_BUILD_KERNELS_CUSTOM=OFF \
5050
-DPYTHON_EXECUTABLE=python3 \
5151
-DEXECUTORCH_NNLIB_OPT=ON \
@@ -70,7 +70,7 @@ else
7070
-DEXECUTORCH_ENABLE_LOGGING=ON \
7171
-DEXECUTORCH_ENABLE_PROGRAM_VERIFICATION=ON \
7272
-DEXECUTORCH_USE_DL=OFF \
73-
-DBUILD_EXECUTORCH_PORTABLE_OPS=ON \
73+
-DEXECUTORCH_BUILD_PORTABLE_OPS=ON \
7474
-DEXECUTORCH_BUILD_KERNELS_CUSTOM=OFF \
7575
-DPYTHON_EXECUTABLE=python3 \
7676
-DEXECUTORCH_NNLIB_OPT=ON \

tools/cmake/Utils.cmake

-82
Original file line numberDiff line numberDiff line change
@@ -29,99 +29,17 @@ function(executorch_print_configuration_summary)
2929
message(STATUS " CMAKE_TOOLCHAIN_FILE : ${CMAKE_TOOLCHAIN_FILE}")
3030
message(STATUS " BUCK2 : ${BUCK2}")
3131
message(STATUS " PYTHON_EXECUTABLE : ${PYTHON_EXECUTABLE}")
32-
message(STATUS " EXECUTORCH_BUILD_ARM_BAREMETAL : "
33-
"${EXECUTORCH_BUILD_ARM_BAREMETAL}"
34-
)
35-
message(STATUS " EXECUTORCH_BUILD_CADENCE : "
36-
"${EXECUTORCH_BUILD_CADENCE}"
37-
)
3832
message(
3933
STATUS
4034
" EXECUTORCH_BUILD_CPUINFO : ${EXECUTORCH_BUILD_CPUINFO}"
4135
)
42-
message(
43-
STATUS
44-
" EXECUTORCH_BUILD_DEVTOOLS : ${EXECUTORCH_BUILD_DEVTOOLS}"
45-
)
4636
message(STATUS " EXECUTORCH_BUILD_EXECUTOR_RUNNER : "
4737
"${EXECUTORCH_BUILD_EXECUTOR_RUNNER}"
4838
)
49-
message(STATUS " EXECUTORCH_BUILD_EXTENSION_DATA_LOADER : "
50-
"${EXECUTORCH_BUILD_EXTENSION_DATA_LOADER}"
51-
)
52-
message(STATUS " EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR : "
53-
"${EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR}"
54-
)
55-
message(STATUS " EXECUTORCH_BUILD_EXTENSION_LLM : "
56-
"${EXECUTORCH_BUILD_EXTENSION_LLM}"
57-
)
58-
message(STATUS " EXECUTORCH_BUILD_EXTENSION_MODULE : "
59-
"${EXECUTORCH_BUILD_EXTENSION_MODULE}"
60-
)
61-
message(STATUS " EXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL : "
62-
"${EXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL}"
63-
)
64-
message(STATUS " EXECUTORCH_BUILD_EXTENSION_TENSOR : "
65-
"${EXECUTORCH_BUILD_EXTENSION_TENSOR}"
66-
)
67-
message(STATUS " EXECUTORCH_BUILD_EXTENSION_TRAINING : "
68-
"${EXECUTORCH_BUILD_EXTENSION_TRAINING}"
69-
)
70-
message(
71-
STATUS
72-
" EXECUTORCH_BUILD_GFLAGS : ${EXECUTORCH_BUILD_GFLAGS}"
73-
)
74-
message(STATUS " EXECUTORCH_BUILD_KERNELS_CUSTOM : "
75-
"${EXECUTORCH_BUILD_KERNELS_CUSTOM}"
76-
)
77-
message(STATUS " EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT : "
78-
"${EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT}"
79-
)
80-
message(STATUS " EXECUTORCH_BUILD_KERNELS_OPTIMIZED : "
81-
"${EXECUTORCH_BUILD_KERNELS_OPTIMIZED}"
82-
)
83-
message(STATUS " EXECUTORCH_BUILD_KERNELS_QUANTIZED : "
84-
"${EXECUTORCH_BUILD_KERNELS_QUANTIZED}"
85-
)
86-
message(
87-
STATUS " EXECUTORCH_BUILD_MPS : ${EXECUTORCH_BUILD_MPS}"
88-
)
89-
message(
90-
STATUS
91-
" EXECUTORCH_BUILD_NEURON : ${EXECUTORCH_BUILD_NEURON}"
92-
)
93-
message(
94-
STATUS
95-
" EXECUTORCH_BUILD_OPENVINO : ${EXECUTORCH_BUILD_OPENVINO}"
96-
)
9739
message(
9840
STATUS
9941
" EXECUTORCH_BUILD_PTHREADPOOL : ${EXECUTORCH_BUILD_PTHREADPOOL}"
10042
)
101-
message(
102-
STATUS
103-
" EXECUTORCH_BUILD_PYBIND : ${EXECUTORCH_BUILD_PYBIND}"
104-
)
105-
message(
106-
STATUS " EXECUTORCH_BUILD_QNN : ${EXECUTORCH_BUILD_QNN}"
107-
)
108-
message(
109-
STATUS
110-
" EXECUTORCH_BUILD_SIZE_TEST : ${EXECUTORCH_BUILD_SIZE_TEST}"
111-
)
112-
message(
113-
STATUS
114-
" EXECUTORCH_BUILD_TESTS : ${EXECUTORCH_BUILD_TESTS}"
115-
)
116-
message(
117-
STATUS
118-
" EXECUTORCH_BUILD_VULKAN : ${EXECUTORCH_BUILD_VULKAN}"
119-
)
120-
message(
121-
STATUS
122-
" EXECUTORCH_BUILD_XNNPACK : ${EXECUTORCH_BUILD_XNNPACK}"
123-
)
124-
12543
endfunction()
12644

12745
# This is the funtion to use -Wl, --whole-archive to link static library NB:

tools/cmake/preset/default.cmake

+145
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,151 @@ define_overridable_option(
5959
"Build executorch runtime optimizing for binary size"
6060
BOOL OFF
6161
)
62+
define_overridable_option(
63+
EXECUTORCH_BUILD_ARM_BAREMETAL
64+
"Build the Arm Baremetal flow for Cortex-M and Ethos-U"
65+
BOOL OFF
66+
)
67+
define_overridable_option(
68+
EXECUTORCH_BUILD_KERNELS_CUSTOM
69+
"Build the custom kernels"
70+
BOOL OFF
71+
)
72+
define_overridable_option(
73+
EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT
74+
"Build the custom ops lib for AOT"
75+
BOOL OFF
76+
)
77+
define_overridable_option(
78+
EXECUTORCH_BUILD_EXTENSION_DATA_LOADER
79+
"Build the Data Loader extension"
80+
BOOL OFF
81+
)
82+
define_overridable_option(
83+
EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR
84+
"Build the Flat Tensor extension"
85+
BOOL OFF
86+
)
87+
define_overridable_option(
88+
EXECUTORCH_BUILD_EXTENSION_LLM
89+
"Build the LLM extension"
90+
BOOL OFF
91+
)
92+
define_overridable_option(
93+
EXECUTORCH_BUILD_EXTENSION_MODULE
94+
"Build the Module extension"
95+
BOOL OFF
96+
)
97+
define_overridable_option(
98+
EXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL
99+
"Build the Runner Util extension"
100+
BOOL OFF
101+
)
102+
define_overridable_option(
103+
EXECUTORCH_BUILD_EXTENSION_TENSOR
104+
"Build the Tensor extension"
105+
BOOL OFF
106+
)
107+
define_overridable_option(
108+
EXECUTORCH_BUILD_EXTENSION_TRAINING
109+
"Build the training extension"
110+
BOOL OFF
111+
)
112+
define_overridable_option(
113+
EXECUTORCH_BUILD_MPS
114+
"Build the MPS backend"
115+
BOOL OFF
116+
)
117+
define_overridable_option(
118+
EXECUTORCH_BUILD_NEURON
119+
"Build the backends/mediatek directory"
120+
BOOL OFF
121+
)
122+
define_overridable_option(
123+
EXECUTORCH_BUILD_OPENVINO
124+
"Build the Openvino backend"
125+
BOOL OFF
126+
)
127+
define_overridable_option(
128+
EXECUTORCH_BUILD_PYBIND
129+
"Build the Python Bindings"
130+
BOOL OFF
131+
)
132+
define_overridable_option(
133+
EXECUTORCH_BUILD_QNN
134+
"Build the Qualcomm backend"
135+
BOOL OFF
136+
)
137+
define_overridable_option(
138+
EXECUTORCH_BUILD_KERNELS_OPTIMIZED
139+
"Build the optimized kernels"
140+
BOOL OFF
141+
)
142+
define_overridable_option(
143+
EXECUTORCH_BUILD_KERNELS_QUANTIZED
144+
"Build the quantized kernels"
145+
BOOL OFF
146+
)
147+
define_overridable_option(
148+
EXECUTORCH_BUILD_DEVTOOLS
149+
"Build the ExecuTorch Developer Tools"
150+
BOOL OFF
151+
)
152+
define_overridable_option(
153+
EXECUTORCH_BUILD_TESTS
154+
"Build CMake-based unit tests"
155+
BOOL OFF
156+
)
157+
define_overridable_option(
158+
EXECUTORCH_NNLIB_OPT
159+
"Build Cadence backend Hifi nnlib kernel"
160+
BOOL OFF
161+
)
162+
define_overridable_option(
163+
EXECUTORCH_CADENCE_CPU_RUNNER
164+
"Build Cadence backend CPU runner"
165+
BOOL OFF
166+
)
167+
define_overridable_option(
168+
EXECUTORCH_BUILD_SIZE_TEST
169+
"Build the size test"
170+
BOOL OFF
171+
)
172+
define_overridable_option(
173+
EXECUTORCH_BUILD_XNNPACK
174+
"Build the XNNPACK backend"
175+
BOOL OFF
176+
)
177+
define_overridable_option(
178+
EXECUTORCH_BUILD_VULKAN
179+
"Build the Vulkan backend"
180+
BOOL OFF
181+
)
182+
define_overridable_option(
183+
EXECUTORCH_BUILD_PORTABLE_OPS
184+
"Build portable_ops library"
185+
BOOL ON
186+
)
187+
define_overridable_option(
188+
EXECUTORCH_USE_DL
189+
"Use libdl library"
190+
BOOL ON
191+
)
192+
define_overridable_option(
193+
EXECUTORCH_BUILD_CADENCE
194+
"Build the Cadence DSP backend"
195+
BOOL OFF
196+
)
197+
define_overridable_option(
198+
EXECUTORCH_BUILD_CORTEX_M
199+
"Build the Cortex-M backend"
200+
BOOL OFF
201+
)
202+
define_overridable_option(
203+
EXECUTORCH_BUILD_GFLAGS
204+
"Build the gflags library."
205+
BOOL ON
206+
)
62207

63208
# MARK: - Validations
64209
# At this point all the options should be configured with their final value.

0 commit comments

Comments
 (0)