-
Notifications
You must be signed in to change notification settings - Fork 683
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
Support for LiteRT (TensorFlow Lite, .tflite) with TOSA 1.0 #19777
Comments
Sample error message when using a recent
Sample error message when using
|
TODO ahead of our next stable release:
|
* Add warning about ongoing TOSA changes and recommend installing old versions per #19777. * Refresh sample code to download from Kaggle instead of a deleted GCS bucket, making more progress on #18518. I couldn't find an equivalent posenet i8 model, so I used a float32 version that expects different dimensions.
Integrate LLVM at llvm/llvm-project@3e223e3a2 Clean, no local changes. The .bc file update is a MLIR bytecode test file that contains a `tosa.mul` op, which had a breaking change so had to be adjusted. A TFLite import test is disabled pending the longer term fix outlined in #19777 . --------- Signed-off-by: Benoit Jacob <[email protected]>
TensorFlow 2.19.0 started rolling out on 2025-02-21: https://pypi.org/project/tensorflow/#history This resulted in test failures since the
We can add new error handling to |
Subscribing to the issue because this is a blocker for update to iree-gd/iree.gd#105 |
Background
The TOSA MLIR dialect is one of IREE's accepted input formats, commonly used to compile and then run LiteRT / TensorFlow Lite programs. The TOSA MLIR dialect is in the process of incrementally upgrading to v1.0: https://discourse.llvm.org/t/rfc-tosa-dialect-increment-to-v1-0/83708. This will introduce a new backwards compatibility baseline after a series of breaking changes to operator definitions.
Warning
During this upgrade process, there will be several planned and unplanned breaking changes that will affect user and developer workflows.
Timelines
Already happened
ExperimentalTFLiteToTosaBytecode
function in tensorflow/tensorflow#83174Upcoming
Support plan
Given the existing and planned events, compatibility is expected to be:
tensorflow<=2.18.0
, useiree-tools-tflite<=20250107.1133
andiree-base-compiler<=3.1.0
iree-base-compiler>=3.2.0
(including current source builds), TOSA .mlir files are likely to be unsupported as the IREE compiler has started to include TOSA v1.0 breaking changes and TensorFlow does not generate the new formattf-nightly
or newertensorflow
versions, the API thatiree-tools-tflite
relies on no longer existsOur current plan is to
iree-import-tflite
script in theiree-tools-tflite
package to use itThis could change with different engineering decisions (e.g. carrying more reverts in IREE). Feedback and patches are welcome.
References
input_tosa
compiler plugin source:compiler/plugins/input/TOSA
iree-tosa-input-transformation-pipeline
source:compiler/plugins/input/TOSA/InputConversion/Passes.cpp
iree-tools-tflite
Python project source:integrations/tensorflow/python_projects/iree_tflite
iree-import-tflite
script source:integrations/tensorflow/python_projects/iree_tflite/iree/tools/tflite/scripts/iree_import_tflite/__main__.py
tensorflow/compiler/mlir/tosa
mlir/include/mlir/Dialect/Tosa
mlir/lib/Dialect/Tosa
mlir/lib/Conversion/TosaToLinalg
The text was updated successfully, but these errors were encountered: