Outlines

June 8, 2026 ยท View on GitHub

This document describes how to install a torch_onnxmlir package and use it to run a torch model. The torch_onnxmlir package provides an onnxmlir-based compiler backend for torch.compile().

  1. Installation
  2. How to use

Installation

The package torch_onnxmlir depends on the package om_pyrt. Follow the instruction here to install om_pyrt.

Install from local directory

If onnx-mlir source code already exists locally, the step of git clone can be skipped.

git clone --recursive https://github.com/onnx/onnx-mlir.git
cd onnx-mlir
pip install -e src/Runtime/python/torch_onnxmlir

Install from pip repository

Not supported yet.

How to use

Plese refer to README.md of the package.