Usage and Integration
Installation
Start with a target plugin for the hardware you want to analyze. It installs MLIA as a dependency. Add this converter in the same Python environment only if your workflow needs LiteRT conversion. A converter alone cannot provide target-specific analysis.
pip install mlia-converters-litert
Overview
This package registers the transformer name tflite_to_tosa through the
mlia.plugin.transformer entry point.
Naming convention
This repo uses two names that matter in different places:
tflite_to_tosa: the transformer name exposed to MLIA workflows.tosa_converter_for_tflite: the Python implementation package.
Integration model
This package adds conversion to an MLIA workflow with a target plugin. It does
not provide a standalone analysis command. Once installed, MLIA can discover
the converter and route LiteRT / TensorFlow Lite .tflite conversion requests
through the transformer registry.
Typical workflow
The converter usually participates in a larger MLIA flow:
- MLIA receives a
.tflitemodel. - The converter plugin transforms it into a TOSA-oriented form.
- A downstream backend consumes the converted artifact.
- MLIA returns target-specific analysis results.
Output controls
The transformer supports two output formats:
mlir-bytecode, which writes a.tosa.mlirbcartifact and is the default.mlir-text, which writes a.tosamlirartifact.
When emit_debug_info is enabled, the plugin passes --emit-debug-info to the
underlying converter.
Installation and selection
Install mlia-converters-litert alongside MLIA and the target plugin. The converter
itself installs in a separate environment on first use. To install it in advance
or repair that environment, run:
mlia backend install tosa-converter-for-tflite --force
Use --show-plan on your check to see the selected converter version. Pass
--execution-profile to choose a compatible alternative toolchain.
Cross-links
- See conversion_flow.md for a more pipeline-oriented view.
- See conversion_outputs.md for what success looks like from this converter's perspective.
- See troubleshooting.md for conversion-specific failures.