feat: Android litert version bump and 16KB page support #146
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue where the Google Play Store would complain that this library was bundling non 16KB page aligned .so files.
Specifically
v1.4.0 of the litert fixes that without requiring a major update to v2.
google-ai-edge/LiteRT#43
Simply updating the dependency version wasn't enough because the directory structure of litert changes from 1.0.1 to 1.4.0
You can see that by going to maven and downloading and unzipping the 1.0.1 AAR and 1.4.0 AAR.
1.0.1 directory structure
headers/
--tensorflow/
----lite/
1.4.0 directory structure
headers/
--external/
----org_tensorflow/
----tensorflow/
--tflite/
This change in directory structure requires updated imports in this projects cpp files. from
#include <tensorflow/lite
to#include <tflite
There was also an issue with the internal litert cpp files not linking correctly because of the extra
external/org_tensorflow/tensorflow
path and the way this project copies over header files. I modified the gradle script to copytensorflow
up two levelsso this: turns into
headers/
--external/
----org_tensorflow/
----tensorflow/
--tflite/
this
headers/
--tensorflow/
--tflite/