Skip to content

Android preset #11119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-presets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
preset: [macos, ios, ios-simulator, pybind, llm]
preset: [android-arm64-v8a, android-x86_64, macos, ios, ios-simulator, pybind, llm]
with:
job-name: build
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
Expand All @@ -39,7 +39,7 @@ jobs:
strategy:
fail-fast: false
matrix:
preset: [pybind, llm]
preset: [android-arm64-v8a, android-x86_64, pybind, llm]
runner: [linux.2xlarge, linux.arm64.2xlarge]
docker-image: [executorch-ubuntu-22.04-clang12, executorch-ubuntu-22.04-gcc11-aarch64]
# Excluding specific runner + docker image combinations that don't make sense:
Expand Down
28 changes: 28 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@
"hidden": true,
"binaryDir": "${sourceDir}/cmake-out"
},
{
"name": "android-arm64-v8a",
"displayName": "Build everything buildable on android arm64-v8a",
"inherits": ["common"],
"cacheVariables": {
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/android.cmake",
"ANDROID_ABI": "arm64-v8a"
},
"condition": {
"type": "inList",
"string": "${hostSystemName}",
"list": ["Darwin", "Linux", "Windows"]
}
},
{
"name": "android-x86_64",
"displayName": "Build everything buildable on android x86_64",
"inherits": ["common"],
"cacheVariables": {
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/android.cmake",
"ANDROID_ABI": "x86_64"
},
"condition": {
"type": "inList",
"string": "${hostSystemName}",
"list": ["Darwin", "Linux", "Windows"]
}
},
{
"name": "macos",
"displayName": "Build everything buildable on macOS",
Expand Down
20 changes: 20 additions & 0 deletions tools/cmake/preset/android.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

set_overridable_option(EXECUTORCH_ENABLE_LOGGING ON)
set_overridable_option(EXECUTORCH_LOG_LEVEL Info)
set_overridable_option(EXECUTORCH_BUILD_TESTING OFF)

set_overridable_option(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_MODULE ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL ON)
set_overridable_option(EXECUTORCH_BUILD_EXTENSION_TENSOR ON)
set_overridable_option(EXECUTORCH_BUILD_KERNELS_CUSTOM ON)
set_overridable_option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED ON)
set_overridable_option(EXECUTORCH_BUILD_KERNELS_QUANTIZED ON)
set_overridable_option(EXECUTORCH_BUILD_XNNPACK ON)
set_overridable_option(EXECUTORCH_XNNPACK_SHARED_WORKSPACE ON)
Loading