@@ -19,6 +19,7 @@ OPTIMIZED=OFF
1919PORTABLE=OFF
2020QUANTIZED=OFF
2121XNNPACK=OFF
22+ TORCHAO=OFF
2223HEADERS_PATH=" include"
2324
2425PLATFORMS=(" ios" " simulator" " macos" )
@@ -74,6 +75,10 @@ libquantized_kernels.a,\
7475libquantized_ops_lib.a,\
7576:"
7677
78+ FRAMEWORK_KERNELS_TORCHAO=" kernels_torchao:\
79+ libtorchao_ops_executorch.a,\
80+ :"
81+
7782usage () {
7883 echo " Usage: $0 [SOURCE_ROOT_DIR] [OPTIONS]"
7984 echo " Build frameworks for Apple platforms."
@@ -92,6 +97,7 @@ usage() {
9297 echo " --portable Build the Portable kernels."
9398 echo " --quantized Build the Quantized kernels."
9499 echo " --xnnpack Build the XNNPACK backend."
100+ echo " --torchao Build the TorchAO kernels."
95101 echo
96102 echo " Example:"
97103 echo " $0 /path/to/source/root --output=cmake-out --toolchain=/path/to/toolchain --python=/path/to/python3 --coreml --mps --xnnpack"
@@ -201,6 +207,7 @@ cmake_build() {
201207 -DEXECUTORCH_BUILD_KERNELS_CUSTOM=$CUSTOM \
202208 -DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=$OPTIMIZED \
203209 -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=$QUANTIZED \
210+ -DEXECUTORCH_BUILD_KERNELS_TORCHAO=$TORCHAO \
204211 -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=" $( pwd) " \
205212 ${platform_flag: +-DPLATFORM=$platform_flag } \
206213 ${platform_target: +-DDEPLOYMENT_TARGET=$platform_target } \
0 commit comments