Skip to content

Commit 40f21e7

Browse files
shoumikhinfacebook-github-bot
authored andcommitted
Build optimized ops framework. (#2667)
Summary: Pull Request resolved: #2667 bypass-github-export-checks Reviewed By: GregoryComer Differential Revision: D55342008 fbshipit-source-id: c6447458a6aa33a826a83925607152b1fa2dac66
1 parent 9de4fb2 commit 40f21e7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/apple.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
9191
# Build iOS Frameworks
9292
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
93-
build/build_apple_frameworks.sh --coreml --mps --portable --quantized --xnnpack
93+
build/build_apple_frameworks.sh --coreml --mps --optimized --portable --quantized --xnnpack
9494
9595
# Bundle iOS Frameworks
9696
for FRAMEWORK in "${FRAMEWORKS[@]}"; do (

build/build_apple_frameworks.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ FLATC="flatc"
1919
IOS_DEPLOYMENT_TARGET="17.0"
2020
COREML=OFF
2121
MPS=OFF
22+
OPTIMIZED=OFF
2223
PORTABLE=OFF
2324
QUANTIZED=OFF
2425
XNNPACK=OFF
2526
HEADERS_PATH="include"
2627
EXECUTORCH_FRAMEWORK="executorch:libexecutorch.a,libextension_apple.a,libextension_data_loader.a,libextension_module.a:$HEADERS_PATH"
2728
COREML_FRAMEWORK="coreml_backend:libcoremldelegate.a:"
2829
MPS_FRAMEWORK="mps_backend:libmpsdelegate.a:"
30+
OPTIMIZED_FRAMEWORK="optimized_backend:liboptimized_kernels.a,liboptimized_ops_lib.a:"
2931
PORTABLE_FRAMEWORK="portable_backend:libportable_kernels.a,libportable_ops_lib.a:"
3032
QUANTIZED_FRAMEWORK="quantized_backend:libquantized_kernels.a,libquantized_ops_lib.a:"
3133
XNNPACK_FRAMEWORK="xnnpack_backend:libXNNPACK.a,libcpuinfo.a,libpthreadpool.a,libxnnpack_backend.a:"
@@ -44,6 +46,7 @@ usage() {
4446
echo " --flatc=FILE FlatBuffers Compiler executable path. Default: '\$SOURCE_ROOT_DIR/third-party/flatbuffers/cmake-out/flatc'"
4547
echo " --coreml Include this flag to build the Core ML backend."
4648
echo " --mps Include this flag to build the Metal Performance Shaders backend."
49+
echo " --optimized Include this flag to build the Optimized backend."
4750
echo " --portable Include this flag to build the Portable backend."
4851
echo " --quantized Include this flag to build the Quantized backend."
4952
echo " --xnnpack Include this flag to build the XNNPACK backend."
@@ -65,6 +68,7 @@ for arg in "$@"; do
6568
--ios-deployment-target=*) IOS_DEPLOYMENT_TARGET="${arg#*=}" ;;
6669
--coreml) COREML=ON ;;
6770
--mps) MPS=ON ;;
71+
--optimized) OPTIMIZED=ON ;;
6872
--portable) PORTABLE=ON ;;
6973
--quantized) QUANTIZED=ON ;;
7074
--xnnpack) XNNPACK=ON ;;
@@ -127,6 +131,7 @@ cmake_build() {
127131
-DIOS_DEPLOYMENT_TARGET="$IOS_DEPLOYMENT_TARGET" \
128132
-DEXECUTORCH_BUILD_COREML=$COREML \
129133
-DEXECUTORCH_BUILD_MPS=$MPS \
134+
-DEXECUTORCH_REGISTER_OPTIMIZED_OPS=$OPTIMIZED \
130135
-DEXECUTORCH_REGISTER_QUANTIZED_OPS=$QUANTIZED \
131136
-DEXECUTORCH_BUILD_XNNPACK=$XNNPACK \
132137
${platform_flag:+-DIOS_PLATFORM=$platform_flag}

0 commit comments

Comments
 (0)