TFLite Integration

IREE supports compiling and running TensorFlow Lite programs stored as TFLite flatbuffers. These files can be imported into an IREE-compatible format then compiled to a series of backends.

Prerequisites

Install TensorFlow-Lite specific dependencies using pip:

python -m pip install \
  iree-compiler \
  iree-runtime \
  iree-tools-tflite

Troubleshooting

Failures during the import step usually indicate a failure to lower from TensorFlow Lite‘s operations to TOSA, the intermediate representation used by IREE. Many TensorFlow Lite operations are not fully supported, particularly those than use dynamic shapes. File an issue to IREE’s TFLite model support project.

Additional Samples

Colab notebooks
Text classification with TFLite and IREEOpen in Colab

!!! todo

[Issue#3954](https://github.com/google/iree/issues/3954): Add documentation
for an Android demo using the
[Java TFLite bindings](https://github.com/google/iree/tree/main/bindings/tflite/java),
once it is complete at
[not-jenni/iree-android-tflite-demo](https://github.com/not-jenni/iree-android-tflite-demo).