skillfed

tosa-tools

TOSA Tools: serialization library, reference model, optional MLIR translator

tosa-tools v2026.5.0 133.5K downloads/30d#11,510 on PyPI
Permissive license Apache-2.0 Active released

What it is and what it does

TOSA Tools is a composite toolkit implementing the Tensor Operator Set Architecture specification from Arm. It bundles three main components: a reference implementation of TOSA operators, serialization methods for reading and writing TOSA graphs in flatbuffer format, and an optional MLIR translator that converts between TOSA's MLIR dialect and serialized representations. The package is published on PyPI and installs as prebuilt wheels for supported platforms, or can be built from source with a C/C++ toolchain.

The toolkit is designed for developers working with TOSA-based machine learning workflows—particularly those integrating TOSA into compiler toolchains, validating operator implementations, or translating between different IR representations. It depends on numpy, flatbuffers, jsonschema, ml-dtypes, and semver for core functionality, and optionally integrates with LLVM/MLIR for translation tasks.

Use it for:

  • Serialize and deserialize TOSA operator graphs for interchange between ML frameworks and compiler backends
  • Validate TOSA operator implementations using the reference model against specification compliance
  • Translate TOSA MLIR dialect representations to and from flatbuffer serialized forms in compiler pipelines
  • Integrate TOSA support into custom ML compiler toolchains requiring standardized operator semantics
  • Test and debug TOSA graph transformations and optimizations before deployment

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

TOSA Tools provides serialization, reference implementation, and optional MLIR translation for the Tensor Operator Set Architecture specification, enabling you to read, write, and work with TOSA graphs and operators.

Yes, if you are working with TOSA in a compiler, ML framework, or operator validation context. The package is actively maintained, permissively licensed, supports current Python versions, and has no known vulnerabilities. Install friction is moderate due to native compilation, but prebuilt wheels are available for common platforms. Not necessary for general ML work outside the TOSA ecosystem.

Install

tosa-tools on PyPI

pip

pip install tosa-tools

uv

uv add tosa-tools

poetry

poetry add tosa-tools

Installing tosa-tools

Before you install

Medium install friction due to compiled native components requiring a C/C++ toolchain. Package is actively maintained with recent releases and supports Python 3.10–3.13 across Linux (x86_64, aarch64), Windows, and macOS platforms, though some platforms are experimental.

License in practice

Licensed under Apache-2.0 (permissive), allowing broad commercial and private use with minimal restrictions beyond attribution and liability disclaimers.

Quickstart

python -m pip install tosa-tools

import tosa.serialization as tosa_ser
# Load a TOSA flatbuffer file
graph = tosa_ser.TosaGraph()
# Use graph for serialization or reference model operations

Requires Python 3.10 or later; building from source requires a working C/C++ toolchain and CMake 3.18+. MLIR translator component requires a compatible LLVM/MLIR build.

Verify before relying

  • Whether prebuilt wheels cover all target platforms or if source compilation is often needed in practice
  • Performance characteristics and scalability limits for large TOSA graphs
  • Maturity and stability of experimental platform support (Windows, macOS, aarch64)

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies 5 — numpy, flatbuffers, jsonschema, ml-dtypes, semver
Maintenance actively maintained — 85 days since the last release
First released
Downloads 133,525/month — #11,510 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: tosa_tools-2026.5.0-cp310-cp310-macosx_15_0_arm64.whl; tosa_tools-2026.5.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; tosa_tools-2026.5.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; tosa_tools-2026.5.0-cp310-cp310-win_amd64.whl; tosa_tools-2026.5.0-cp311-cp311-macosx_15_0_arm64.whl; tosa_tools-2026.5.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; tosa_tools-2026.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; tosa_tools-2026.5.0-cp311-cp311-win_amd64.whl; tosa_tools-2026.5.0-cp312-cp312-macosx_15_0_arm64.whl; tosa_tools-2026.5.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; tosa_tools-2026.5.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; tosa_tools-2026.5.0-cp312-cp312-win_amd64.whl; tosa_tools-2026.5.0-cp313-cp313-macosx_15_0_arm64.whl; tosa_tools-2026.5.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; tosa_tools-2026.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; tosa_tools-2026.5.0-cp313-cp313-win_amd64.whl

License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

TOSA serialization librarytensor operator set architectureTOSA graph toolsMLIR TOSA translationTOSA reference modelflatbuffer tensor serializationTOSA specification implementation
tensor-irmlircompiler-tools

More Artificial Intelligence packages