Skip to content

Commit 3c1500c

Browse files
authored
Add xnnpack-no-sme2 flavor to Android release workflow (#16589)
1 parent b34be83 commit 3c1500c

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/android-release-artifacts.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
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

backends/xnnpack/cmake/Dependencies.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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.
4547
set(XNNPACK_ENABLE_ARM_SME2
4648
ON
4749
CACHE BOOL ""

scripts/build_android_library.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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}"

0 commit comments

Comments
 (0)