Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!--
SPDX-FileCopyrightText: Copyright 2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
SPDX-License-Identifier: Apache-2.0
-->
# TOSA converter for TFLite
A tool to legalize TFLite FlatBuffer to TOSA MLIR Bytecode.
## Python wheel creation
To build the Python wheel Clang is required, the wheel can then be built using:
```console
pip install build
python -m build --wheel
```
The wheel should now be in the `dist` directory.
## Usage
```python
from tosa_converter_for_tflite import tflite_flatbuffer_to_tosa_mlir_bytecode
tflite_flatbuffer_to_tosa_mlir_bytecode("model_input.tflite", "model_output.tosa.mlirbc")
```
## Supported Platforms
This tool supports Linux and Windows(r) on x86_64 architectures.
# License
TOSA Converter for TFLite is distributed under the Apache 2.0 License.
LLVM and the LLVM logo are trademarks of the LLVM Foundation.
TensorFlow, the TensorFlow logo and any related marks are trademarks of Google Inc.