Skip to main content

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:

  1. MLIA receives a .tflite model.
  2. The converter plugin transforms it into a TOSA-oriented form.
  3. A downstream backend consumes the converted artifact.
  4. MLIA returns target-specific analysis results.

Output controls​

The transformer supports two output formats:

  • mlir-bytecode, which writes a .tosa.mlirbc artifact and is the default.
  • mlir-text, which writes a .tosamlir artifact.

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.