Run a Model

April 20, 2026 · View on GitHub

Tests Codecov Ask DeepWiki

Hardware | Documentation | Discord | Join Us | Bounty $

forge onnx

TT-Forge-ONNX is a graph compiler for running ONNX, TensorFlow, and PaddlePaddle models on Tenstorrent hardware, optimizing computational graphs for performance and efficiency.

Part of the TT-Forge AI compiler ecosystem.



Run a Model

Install TT-Forge-ONNX and run an ONNX model on Tenstorrent hardware:

# Install uv if you don't have it yet
curl -LsSf https://astral.sh/uv/install.sh | sh

uv pip install tt_forge_onnx --extra-index-url https://pypi.eng.aws.tenstorrent.com/
uv pip install tt_tvm --extra-index-url https://pypi.eng.aws.tenstorrent.com/
import torch, onnx, forge

# Load any ONNX model
onnx_model = onnx.load("resnet50.onnx")
input_tensor = torch.randn(1, 3, 224, 224)

# Compile and run on Tenstorrent
compiled_model = forge.compile(onnx_model, [input_tensor])
output = compiled_model(input_tensor)

predicted_class = output[0].argmax(dim=-1).item()
print(f"Predicted ImageNet class: {predicted_class}")

Any .onnx file works — export from PyTorch, TensorFlow, PaddlePaddle, or grab one from the ONNX Model Zoo. See the full Getting Started Guide for Docker and build-from-source options.


Quick Links


What is this Repo?

TT-Forge-ONNX is a TVM-based frontend within the TT-Forge ecosystem. It compiles models from ONNX, TensorFlow, and PaddlePaddle for Tenstorrent hardware (Wormhole, Blackhole). It also supports PyTorch, though TT-XLA is recommended for PyTorch and JAX models. TT-Forge-ONNX is for single-chip configurations only.

FrontendUse ForChip Support
TT-XLAPyTorch, JAXSingle & Multi-chip
TT-Forge-ONNX (this repo)ONNX, TensorFlow, PaddlePaddleSingle-chip

Related Tenstorrent Projects

  • TT-Forge — Central hub for the TT-Forge compiler project (demos, benchmarks, releases)
  • TT-XLA — Primary frontend for PyTorch and JAX (single and multi-chip)
  • TT-MLIR — Core MLIR-based compiler framework for Tenstorrent hardware
  • TT-Metal — Low-level programming model and kernel development for Tenstorrent hardware

Tenstorrent Bounty Program Terms and Conditions

This repo is a part of Tenstorrent’s bounty program. If you are interested in helping to improve tt-forge-onnx, please make sure to read the Tenstorrent Bounty Program Terms and Conditions before heading to the issues tab. Look for the issues that are tagged with both “bounty” and difficulty level!