Skip to content

Niro

Niro compiles computation graphs from ONNX (TensorFlow, PyTorch, JAX, and others planned) through one unified, strongly typed SSA IR. MLIR is the primary target; GIMPLE, QBE, and other backends may follow.

Work in progress

Niro is at an early stage and is not yet ready for production use.

Install

uv tool install git+https://github.com/cospectrum/niro.git

Usage

Compile a model to textual MLIR:

niro emit mlir model.onnx -o model.mlir

Input and output default to the standard streams, so Niro composes with other tools. Pass --input-format when there is no file extension to infer it from:

niro emit mlir --input-format onnx < model.onnx | mlir-opt

Inspect a model's entry-point signature:

niro inspect signature model.onnx

Next steps

  • IR specification — the types, values, and operations Niro compiles through.
  • Python API — build, inspect, import, and export Niro programs programmatically.
  • Contributing — set up the development environment and run the checks.