File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 type : choice
1616 options :
1717 - " xnnpack"
18+ - " xnnpack-no-sme2"
1819 - " vulkan"
1920 - " qnn"
2021 - " all"
@@ -102,6 +103,10 @@ jobs:
102103 export EXECUTORCH_BUILD_VULKAN=ON
103104 fi
104105
106+ if [[ "$FLAVOR" == "xnnpack-no-sme2" ]]; then
107+ export XNNPACK_ENABLE_ARM_SME2=OFF
108+ fi
109+
105110 if [[ "$FLAVOR" == "qnn" || "$FLAVOR" == "all" ]]; then
106111 PYTHON_EXECUTABLE=python bash .ci/scripts/setup-qnn-deps.sh
107112 PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ set(XNNPACK_ENABLE_AVX512VNNIGFNI
4242 OFF
4343 CACHE BOOL ""
4444)
45+ # Enable ARM SME2 by default. Can be disabled with -DXNNPACK_ENABLE_ARM_SME2=OFF
46+ # for Android emulator compatibility, which may crash with SME2 kernels.
4547set (XNNPACK_ENABLE_ARM_SME2
4648 ON
4749 CACHE BOOL ""
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ build_android_native_library() {
3333 fi
3434
3535 EXECUTORCH_BUILD_VULKAN=" ${EXECUTORCH_BUILD_VULKAN:- OFF} "
36+ XNNPACK_ENABLE_ARM_SME2=" ${XNNPACK_ENABLE_ARM_SME2:- ON} "
3637
3738 cmake . -DCMAKE_INSTALL_PREFIX=" ${CMAKE_OUT} " \
3839 -DCMAKE_TOOLCHAIN_FILE=" ${ANDROID_NDK} /build/cmake/android.toolchain.cmake" \
@@ -48,6 +49,7 @@ build_android_native_library() {
4849 -DEXECUTORCH_BUILD_QNN=" ${EXECUTORCH_BUILD_QNN} " \
4950 -DQNN_SDK_ROOT=" ${QNN_SDK_ROOT} " \
5051 -DEXECUTORCH_BUILD_VULKAN=" ${EXECUTORCH_BUILD_VULKAN} " \
52+ -DXNNPACK_ENABLE_ARM_SME2=" ${XNNPACK_ENABLE_ARM_SME2} " \
5153 -DSUPPORT_REGEX_LOOKAHEAD=ON \
5254 -DCMAKE_BUILD_TYPE=" ${EXECUTORCH_CMAKE_BUILD_TYPE} " \
5355 -B" ${CMAKE_OUT} "
You can’t perform that action at this time.
0 commit comments