Open ML Compiler Foundation for the Agentic Era

Clone this repo:
  1. dcc02de [DOCS] Link README to the compiler foundation blog post (#195) by Bohan Hou · 3 hours ago main
  2. 24173d5 [Rust] Update TVM FFI and use Result<UnchangedOr<Any>> map and mutate results (#194) by Tianqi Chen · 4 hours ago
  3. 123543a [Fix][CUDA] Align device target architecture detection (#193) by Shushi Hong · 5 hours ago
  4. d7347e6 [FIX] Drop cancelled iterator-map splits before fusion (#191) by Tianqi Chen · 5 hours ago
  5. 95518b0 [DOCS][Rust] Add constraint-aware traversal and clarify visitors and mutators (#192) by Tianqi Chen · 6 hours ago

TVM TIRx: ML Compiler Foundation for the Agentic Era

📚 Documentation | 🚀 Quick Start

We believe that, in the future, all GPU kernels will be developed, optimized, and verified by AI agents.

You might wonder: If my Claude or Codex can just spit out CUDA, PTX, or even SASS directly, why bother with another compiler layer? We've been asking ourselves the same question.

Our answer is yes, but perhaps not in the form we know today. Even when agents generate code directly, analysis and independent verification still need structured program representations and precisely defined semantics. A minimal, extensible compiler foundation provides these shared building blocks while leaving agents free to explore their own optimization strategies. Read our blog post for the full discussion.

TIRx is our attempt to build a minimal, stable, and extensible DSL and compiler foundation for that future, enabling agents to write and optimize kernels, develop their own analyses, and eventually verify correctness.

Features

  • Minimal, stable core IR — a small, stable set of core AST nodes, designed for common needs and extensions.
  • Predictable utilities — TVM-FFI bridge generation, symbolic integer analysis, structural traversal and mapping, and minimal code generation for CUDA and host LLVM.
  • Dynamic extension by design — agents can build and iterate on extensions in independent packages, without rebuilding a monolithic compiler.
  • First-class cross-language support — Python, C++, and Rust, allowing agents to prototype rapidly and move performance-critical components across languages.
  • Built on stable toolchains — leverage established compiler backends instead of reinventing them.

Documentation

Check out the documentation to get started.