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.
Source layout
conversion.py: conversion logic.converter_plugin.py: MLIA plugin registration.install.py: installation metadata for MLIA-managed backend tooling.
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.