-
Notifications
You must be signed in to change notification settings - Fork 742
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
Android preset #11119
Changes from 13 commits
20634a2
4acacfd
71b062e
522e8b0
cb8d055
2db2bef
f10c831
dba1337
f1e02c1
3866941
f520003
ad8c7cc
ab82fb9
bf29bf8
a974109
8cea9a3
256c5ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,28 +36,13 @@ build_android_native_library() { | |
|
|
||
| cmake . -DCMAKE_INSTALL_PREFIX="${CMAKE_OUT}" \ | ||
| -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK}/build/cmake/android.toolchain.cmake" \ | ||
| -DANDROID_ABI="${ANDROID_ABI}" \ | ||
| --preset "android-${ANDROID_ABI}" \ | ||
| -DANDROID_PLATFORM=android-26 \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add this to preset as well?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to build twice, one for x86_64, one for arm64-v8a.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can set one as default and override another one |
||
| -DBUILD_TESTING=OFF \ | ||
| -DEXECUTORCH_PAL_DEFAULT=android \ | ||
| -DEXECUTORCH_ENABLE_LOGGING=ON \ | ||
| -DEXECUTORCH_BUILD_ANDROID_JNI=ON \ | ||
| -DEXECUTORCH_BUILD_DEVTOOLS=ON \ | ||
| -DEXECUTORCH_ENABLE_EVENT_TRACER="${EXECUTORCH_ANDROID_PROFILING:-OFF}" \ | ||
| -DEXECUTORCH_LOG_LEVEL=Info \ | ||
| -DEXECUTORCH_BUILD_XNNPACK=ON \ | ||
| -DEXECUTORCH_XNNPACK_SHARED_WORKSPACE=ON \ | ||
| -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \ | ||
| -DEXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR=ON \ | ||
| -DEXECUTORCH_BUILD_EXTENSION_LLM="${EXECUTORCH_BUILD_EXTENSION_LLM:-ON}" \ | ||
| -DEXECUTORCH_BUILD_EXTENSION_LLM_RUNNER="${EXECUTORCH_BUILD_EXTENSION_LLM:-ON}" \ | ||
| -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \ | ||
| -DEXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL=ON \ | ||
| -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \ | ||
| -DEXECUTORCH_BUILD_EXTENSION_TRAINING=ON \ | ||
| -DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \ | ||
| -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \ | ||
| -DEXECUTORCH_BUILD_KERNELS_LLM="${EXECUTORCH_BUILD_EXTENSION_LLM:-ON}" \ | ||
| -DEXECUTORCH_BUILD_LLAMA_JNI="${EXECUTORCH_BUILD_EXTENSION_LLM:-ON}" \ | ||
| -DEXECUTORCH_BUILD_NEURON="${EXECUTORCH_BUILD_NEURON}" \ | ||
| -DNEURON_BUFFER_ALLOCATOR_LIB="${NEURON_BUFFER_ALLOCATOR_LIB}" \ | ||
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # 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(BUILD_TESTING OFF) | ||
|
|
||
| set_overridable_option(EXECUTORCH_BUILD_ANDROID_JNI ON) | ||
| set_overridable_option(EXECUTORCH_PAL_DEFAULT android) | ||
| set_overridable_option(EXECUTORCH_ENABLE_EVENT_TRACER OFF) | ||
| set_overridable_option(EXECUTORCH_ENABLE_LOGGING ON) | ||
| set_overridable_option(EXECUTORCH_LOG_LEVEL Info) | ||
|
|
||
| set_overridable_option(EXECUTORCH_BUILD_DEVTOOLS ON) | ||
|
|
||
| set_overridable_option(EXECUTORCH_BUILD_XNNPACK ON) | ||
| set_overridable_option(EXECUTORCH_XNNPACK_SHARED_WORKSPACE ON) | ||
|
|
||
| set_overridable_option(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER ON) | ||
| set_overridable_option(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON) | ||
| set_overridable_option(EXECUTORCH_BUILD_EXTENSION_LLM ON) | ||
| set_overridable_option(EXECUTORCH_BUILD_EXTENSION_LLM_RUNNER 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_EXTENSION_TRAINING ON) | ||
|
|
||
| set_overridable_option(EXECUTORCH_BUILD_KERNELS_LLM ON) | ||
| set_overridable_option(EXECUTORCH_BUILD_KERNELS_OPTIMIZED ON) | ||
| set_overridable_option(EXECUTORCH_BUILD_KERNELS_QUANTIZED ON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't sound accurate right? Could be "Build executorch core and JNI bindings on android arm64-v8a"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!