-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Upgraded and pre-compiled TFLite binaries for both iOS and Android #85
Conversation
…e binaries in the repo.
wow, this is really cool!!! I'll check that out internally with my team, thank you for your PR!! 🥳 |
I kinda hate that we have to use two (or actually even three) different sources of truth for a purely cross-platform library, i.e. the headers are one source of truth, then we either have them implemented as a 2.17.0 pod, or a 2.16.1 maven dep... I was hoping to build everything from source, off of a stable release to have a single source of truth. But this is definitely a better option than what we have now. |
hm, iOS build failed... |
This commit should fix that: 75ae18a |
@mrousavy please review 🙏 |
Could you please make a new release version 1.4.0 with this PR merged in? |
@mrousavy would greatly appreciate a new release with this fix in! |
Done, 1.4.0 is out! |
Thank you all for this fix! It's very helpful running the model on a simulator. The only issue I found so far is
|
@mrousavy @PStrakendal The While it might work fine when cloning the repository, but installing library and building the app can result in missing TensorFlow headers, causing the CMake build to fail. |
I think this PR may have broke the v 1.3.0 model output with delegate: since v 1.4.0 + Sept 1 2024, cannot load an updated trained model with a |
Current version (1.3.0) has some known issues:
In this PR I suggest to use the ios binaries from TensorFlowLiteC pod instead of building and committing them to the repo. The binaries in the TensorFlowLiteC pod also supports building on x86 Simulators.
In this PR I have also upgraded the version of TFLite.
Version 2.17.0 has not been published to the Maven repository yet tensorflow/tensorflow#72157) and for the TensorFlowLiteC there is no 2.16.1 version published. So at the moment the versions for Android and iOS are still not the same.
Some needed headers are not included in the .aar files newer than 2.12.0, that is why the tensorflow submodule is still needed.
This is an alternative to This PR, but instead of manually extracting the binaries from the TensorFlowLiteC I suggest them to be used directly from the podspec. I also think it is better to use released versions of TensorFlowLiteC and not nightly builds.
I have tested building and running the example app on Android (Samsung Galaxy S21), iPhone SE (2022), and building for iOS simulators on a MacBook Pro M1 and MacBook Pro Intel.