Add Android 16KB page size support for ONNX Runtime Extensions#1007
Add Android 16KB page size support for ONNX Runtime Extensions#1007ssk18 wants to merge 19 commits intomicrosoft:mainfrom
Conversation
enable 16KB page size compatibility for Android 15+ devices. - Apply -Wl,-z,max-page-size=16384 linker flag to all Android targets - Modernize to target_link_options() for better maintainability - Add Clang/GNU compiler check before applying flags - Configure Gradle with -DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON - Support all ABIs: arm64-v8a, armeabi-v7a, x86_64, x86
|
@microsoft-github-policy-service agree |
|
/azp run extensions.ci |
|
No pipelines are associated with this pull request. |
- Add README section explaining ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES option - Add GitHub workflow to verify 16KB alignment on arm64-v8a builds
| @@ -0,0 +1,127 @@ | |||
| name: Android 16KB Page Size Verification | |||
There was a problem hiding this comment.
@sayanshaw24 is it ok to add a new workflow for this check? or would it be preferable to add it to the existing CI build pipeline?
…B support, project requires NDK r27d which fully supports the linker flag, so no need for optional configuration
…and updated readme
Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
|
@edgchen1 is it a pre existing issue in tokenizer that's causing the workflow failure? |
hm, it looks unrelated to the changes in this PR. are you able to reproduce it locally? looks like tokenizer_common.h is missing an |
|
@edgchen1 Locally, I am able to create a shared library without any issue and, i am using NDK 26.1 but in a workflow it is NDK r25c. Not sure, if that is causing the failure. If you agree, I can add "#include <unordered_map>" and see if it works. |
sure, I think it's good to add it anyway. the tokenizer_common.h header should be able to be included independently. |
…able-16KB-for-android
|
/azp run onnxruntime-extensions.CI |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
so, libonnxruntime_extensions4j_jni.so and libortextensions.so passes as expected but CI workflow is checking all other libraries as well. Removed checks for other shared libraries. |
|
/azp run onnxruntime-extensions.CI |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@edgchen1 these CI failures look unrelated to this change. |
they are not related to this change. we'll need to look into it. |
|
I urgently need to solve this problem when 16kb support will be available. |
|
/azp run onnxruntime-extensions.CI |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run onnxruntime-extensions.CI |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Add linker flags and build configuration to support Android devices
using 16KB page sizes. This ensures compatibility with Android 15+
devices while maintaining backward compatibility with 4KB page systems.
Changes:
Android shared and executable targets
Technical details:
Testing: