-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Mobile] Will provide supported 16KB-page-size prebuilt Android .so in the future? #21837
Comments
We'll look at adding the build flags in the next release. Based on this there are no actual devices with a 16KB page size yet. https://android-developers.googleblog.com/2024/08/adding-16-kb-page-size-to-android.html
|
Thank you for the update!
|
Hi, @skottmckay, could you please suggest which file would be best to add the flag '16KB page size' |
If it needs to be set globally you could try adding an If it just needs to be set for libonnxruntime.so you could add something to https://github.com/microsoft/onnxruntime/blob/main/cmake/onnxruntime.cmake Note that |
Work great with the build comment and with modified https://github.com/microsoft/onnxruntime/blob/main/cmake/onnxruntime.cmake
Also passed with my local VTS elf_alignment_test "16KB-page-size" check Thanks for the help.
|
Excellent. Would you be able to submit a PR with the change? |
Submit a PR #21876 based on v1.16.1 changed |
Thanks for submitting the PR. You may need to merge your fork with the latest version of main though as it seems to be out of date leading to a massive number of changed files. |
If it's easier I can create a PR with your change. Would be interested to know if this works instead so we limit where the linker flag is applied to just the onnxruntime shared library.
|
On second thought we probably need to do this globally so the unit test projects have the same setting applied. adjust_global_compile_flags.cmake may be the best place to do this. |
@skottmckay You can create a PR with the changes. I'm currently without the necessary device to conduct the tests. |
### Description <!-- Describe your changes. --> Add linker flags to support 16KB page size support on Android. See https://source.android.com/docs/core/architecture/16kb-page-size/16kb#build-lib-16kb-alignment ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> #21837
Describe the issue
With Android A15 introducing a beta requirement for shared libraries to support a 16KB page size on ARM64 devices
W
source: (https://source.android.com/docs/core/architecture/16kb-page-size/16kb)
We’re keen to ensure our project remains compatible with this and future Android versions, including A16.
Our current prebuilt .so files follow the older page size specifications
which might cause compatibility or performance concerns.
To reproduce
Use the existing prebuilt .so file on an Android A15 device or emulator.
Check for failures in the VTS elf_alignment_test related to the 16KB page size.
Urgency
Maybe Urgent
As the Android A15 adoption grows, addressing this could become more pressing. We would appreciate guidance on whether there are plans to provide a prebuilt .so file that meets the 16KB page size requirement or any recommended steps we can take to ensure continued compatibility.
Platform
Android
OS Version
15
ONNX Runtime Installation
Released Package
Compiler Version (if 'Built from Source')
prebuild
Package Name (if 'Released Package')
onnxruntime-android
ONNX Runtime Version or Commit ID
version 1.16.1
ONNX Runtime API
C++/C
Architecture
ARM64
Execution Provider
Default CPU, NNAPI
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: