Clone this repo:
  1. 819b81b tflite: npu: Async Kernel API implementation by Ritul Jasuja · 4 months ago main
  2. a7fd779 tflite: Fix potential UAF issue in async_driver by Tommy Chiang · 13 days ago
  3. f435e87 tflite: Add README for patch management by Shik Chen · 4 weeks ago firmware-cr50-prepvt-16155.B
  4. ca135a0 tflite: mtk_neuron: Allow int32 -> float32 cast op by Tommy Chiang · 3 weeks ago
  5. 8f39b39 tflite: mtk_neuron: Respect the model_token provided by caller by Tommy Chiang · 7 weeks ago firmware-ec-R133-16151.2.B release-R133-16151.B stabilize-starline-16150.B

ChromeOS TFLite

This repository hosts the core ChromeOS TFLite components, enabling on-device machine learning (ODML) workloads accelerated by NPU.

The corresponding ebuild can be found at: tensorflow-9999.ebuild

TensorFlow Patch Management

Patches are stored in the patch/ directory and explicitly listed in WORKSPACE.bazel. A helper script, ./script/patcher.py, is included to facilitate patch management within a TFLite workspace.

The typical workflow:

  1. Eject (Download) TensorFlow Source Code

    Download the TensorFlow source code into a local git repository with patches applied as individual commits:

    ./script/patcher.py eject
    

    This creates a new local git repository at tensorflow/.

  2. Modify the TensorFlow Repository

    Make changes to the tensorflow/ repository as needed, following standard git workflows. Optionally, include a PATCH_NAME= tag in commit messages to specify the filename of the corresponding patch.

  3. Seal the Repository

    Regenerate the patch files and update the WORKSPACE.bazel file:

    ./script/patcher.py seal
    

    This updates the patches in the patch/ directory and reflects the changes in WORKSPACE.bazel.

It's preferred to submit changes to upstream TensorFlow first and cherry-pick them as patches. This helps minimize divergence and makes TensorFlow updates easier.