You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The source code is added to this repo as a git submodule (tensorflow/), and when shipping the library to npm I prebuild a TensorFlowLiteC binary (including the TensorFlowLiteCCoreML delegate), add the headers, then ship it.
On Android however, we use the org.tensorflow:tensorflow-lite library from Gradle:
This ships the Java files as well as introducing some other unnecessary files for the bundle. Also, it is outdated and not in sync with the iOS version, some fixes, features or improvements may only be available on iOS, but not on Android due to us using the published package from Maven. (Currently we use v2.2.0, which is outdated by more than two versions)
Instead, we should aim to also use TensorFlowLiteC (any potentially also an Android GPU delegate?) from source by also building it in the tensorflow/ submodule, just like how we do it on iOS, then add the headers and link the library in the android/CMakeLists.txt config.
This would align the versions perfectly and we don't need to fetch a prebuild version from Maven.
This PR was an attempt at doing so: #33 ...but I couldn't manage to get Bazel to build the Android version.
We need to make sure this ships the correct binaries (x86, x86_64, arm, and arm64 - or just x86_fat and arm_fat).
Added Bonus: Maybe we can even do the whole building in the CI with dependabot, so everytime the submodule changes (a commit lands on main in tensorflow/) it opens a PR, prebuilds the libraries, moves them into ios and android, and I only need to merge that to get the changes. No need to build it on my mac. Makes it even more safe
The text was updated successfully, but these errors were encountered:
Today, we build TensorFlowLiteC from source to use it in iOS:
react-native-fast-tflite/scripts/build-tensorflow-ios.sh
Lines 13 to 27 in 5b8d612
The source code is added to this repo as a git submodule (
tensorflow/
), and when shipping the library to npm I prebuild a TensorFlowLiteC binary (including the TensorFlowLiteCCoreML delegate), add the headers, then ship it.On Android however, we use the
org.tensorflow:tensorflow-lite
library from Gradle:react-native-fast-tflite/android/build.gradle
Lines 125 to 128 in 5b8d612
This ships the Java files as well as introducing some other unnecessary files for the bundle. Also, it is outdated and not in sync with the iOS version, some fixes, features or improvements may only be available on iOS, but not on Android due to us using the published package from Maven. (Currently we use v2.2.0, which is outdated by more than two versions)
Instead, we should aim to also use TensorFlowLiteC (any potentially also an Android GPU delegate?) from source by also building it in the
tensorflow/
submodule, just like how we do it on iOS, then add the headers and link the library in theandroid/CMakeLists.txt
config.This would align the versions perfectly and we don't need to fetch a prebuild version from Maven.
This PR was an attempt at doing so: #33 ...but I couldn't manage to get Bazel to build the Android version.
We need to make sure this ships the correct binaries (x86, x86_64, arm, and arm64 - or just x86_fat and arm_fat).
Added Bonus: Maybe we can even do the whole building in the CI with dependabot, so everytime the submodule changes (a commit lands on main in
tensorflow/
) it opens a PR, prebuilds the libraries, moves them intoios
andandroid
, and I only need to merge that to get the changes. No need to build it on my mac. Makes it even more safeThe text was updated successfully, but these errors were encountered: