@@ -20,12 +20,14 @@ IOS_DEPLOYMENT_TARGET="17.0"
20
20
COREML=OFF
21
21
MPS=OFF
22
22
PORTABLE=OFF
23
+ QUANTIZED=OFF
23
24
XNNPACK=OFF
24
25
HEADERS_PATH=" include"
25
26
EXECUTORCH_FRAMEWORK=" executorch:libexecutorch.a,libextension_apple.a,libextension_data_loader.a,libextension_module.a:$HEADERS_PATH "
26
27
COREML_FRAMEWORK=" coreml_backend:libcoremldelegate.a:"
27
28
MPS_FRAMEWORK=" mps_backend:libmpsdelegate.a:"
28
29
PORTABLE_FRAMEWORK=" portable_backend:libportable_kernels.a,libportable_ops_lib.a:"
30
+ QUANTIZED_FRAMEWORK=" quantized_backend:libquantized_kernels.a,libquantized_ops_lib.a:"
29
31
XNNPACK_FRAMEWORK=" xnnpack_backend:libXNNPACK.a,libcpuinfo.a,libpthreadpool.a,libxnnpack_backend.a:"
30
32
31
33
usage () {
@@ -43,6 +45,7 @@ usage() {
43
45
echo " --coreml Include this flag to build the Core ML backend."
44
46
echo " --mps Include this flag to build the Metal Performance Shaders backend."
45
47
echo " --portable Include this flag to build the Portable backend."
48
+ echo " --quantized Include this flag to build the Quantized backend."
46
49
echo " --xnnpack Include this flag to build the XNNPACK backend."
47
50
echo
48
51
echo " Example:"
@@ -61,8 +64,9 @@ for arg in "$@"; do
61
64
--flatc=* ) FLATC=" ${arg#* =} " ;;
62
65
--ios-deployment-target=* ) IOS_DEPLOYMENT_TARGET=" ${arg#* =} " ;;
63
66
--coreml) COREML=ON ;;
64
- --portable) PORTABLE=ON ;;
65
67
--mps) MPS=ON ;;
68
+ --portable) PORTABLE=ON ;;
69
+ --quantized) QUANTIZED=ON ;;
66
70
--xnnpack) XNNPACK=ON ;;
67
71
* )
68
72
if [[ -z " $SOURCE_ROOT_DIR " ]]; then
@@ -122,6 +126,7 @@ cmake_build() {
122
126
-DIOS_DEPLOYMENT_TARGET=" $IOS_DEPLOYMENT_TARGET " \
123
127
-DEXECUTORCH_BUILD_COREML=$COREML \
124
128
-DEXECUTORCH_BUILD_MPS=$MPS \
129
+ -DREGISTER_QUANTIZED_OPS=$QUANTIZED \
125
130
-DEXECUTORCH_BUILD_XNNPACK=$XNNPACK \
126
131
${platform_flag: +-DIOS_PLATFORM=$platform_flag }
127
132
cmake --build . --config $MODE
@@ -159,9 +164,10 @@ append_framework_flag() {
159
164
}
160
165
161
166
append_framework_flag " ON" " $EXECUTORCH_FRAMEWORK "
162
- append_framework_flag " $PORTABLE " " $PORTABLE_FRAMEWORK "
163
167
append_framework_flag " $COREML " " $COREML_FRAMEWORK "
164
168
append_framework_flag " $MPS " " $MPS_FRAMEWORK "
169
+ append_framework_flag " $PORTABLE " " $PORTABLE_FRAMEWORK "
170
+ append_framework_flag " $QUANTIZED " " $QUANTIZED_FRAMEWORK "
165
171
append_framework_flag " $XNNPACK " " $XNNPACK_FRAMEWORK "
166
172
167
173
" $SOURCE_ROOT_DIR " /build/create_frameworks.sh " ${FRAMEWORK_FLAGS[@]} "
0 commit comments