# llvm/torch-mlir

The Torch-MLIR project aims to provide first class support from the PyTorch ecosystem to the MLIR ecosystem.

Repository: https://github.com/llvm/torch-mlir
Canonical: https://ross.abutalabs.com/products/torch-mlir
Language: C++
License: NOASSERTION
License Family: other
Topics: pytorch, compiler, mlir
Last push: 2026-08-25T17:58:16+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 8, longevity 100
- inputs: {"age_days": 2225, "days_push": 8, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1892, forks 728 (observed 2026-08-28T04:05:50.491180+00:00)

## What it is
Torch-MLIR is a compiler project providing first-class translation of PyTorch programs into the MLIR compiler ecosystem. It lets hardware vendors and compiler authors lower PyTorch models to MLIR dialects and then to custom backends without writing their own PyTorch frontends.

## Use cases
- compile pytorch models to mlir
- lower torch programs to custom hardware backends
- build a compiler backend for pytorch without writing a frontend
- convert pytorch to onnx then to mlir
- run pytorch models on heterogeneous accelerators
- integrate pytorch into an mlir-based toolchain

## When to choose
- you are a hardware vendor building an MLIR-based backend for PyTorch models
- you need a standardized, community-maintained PyTorch-to-MLIR lowering instead of a custom one
- you are doing compiler research on MLIR dialects for ML workloads

## When to avoid
- you just want to deploy PyTorch models to standard runtimes like ONNX Runtime or TensorRT
- you need a production-endorsed LLVM component, since the project is still in LLVM incubation
- your target stack has no MLIR involvement at all

## Facets
- artifact type: library
- maturity: active
- function: compiler, machine-learning, llm-training
- domain: machine-learning, compilers, developer-tools, gpu-computing
- platform: python, cpp, windows
- tags: mlir, pytorch, compiler-infrastructure, hardware-lowering, llvm-incubator, linux, macos

## Member repositories
- llvm/torch-mlir (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:50.491180+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:12:57.761907+00:00, confidence not recorded.
  - readme: https://github.com/llvm/torch-mlir (fetched 2026-08-28T04:05:50.491180+00:00, sha d16e1544b824)
- Data as of 2026-08-30T08:39:29.467469+00:00.
