Repolode
microsoft

microsoft/antares

AutoRT is a compiler tool that helps developers create, benchmark and optimize PyTorch operators for their own accelerators.

Stars
470
Forks
51
Open issues
12
Last commit
14 days ago

What is it?

AutoRT, the next generation of Microsoft's Antares project, is a compiler solution for runtime users who want to write, benchmark and tune operators for PyTorch on their own accelerators. Kernels are written as CUDA or HIP C++ function bodies, with a small header declaring input and output tensor shapes and launch bindings.

The project provides an autort command-line tool. A basic kernel is defined inline with a function signature, shape bindings and a body that uses blockIdx and threadIdx, and AutoRT compiles and runs it. The repository also includes a SKILLS.md guide intended for AI agents that need to write such kernels.

The recommended environments are Docker images for CUDA (Ubuntu 24.04 with CUDA 12.8) and ROCm (Ubuntu 24.04 with ROCm 7.2.4). Earlier manual and legacy documentation is kept for reference but marked deprecated.

Key features

  • 01Lets users write PyTorch operator kernels in CUDA or HIP C++ syntax.
  • 02Provides an autort command-line tool that compiles and runs inline kernel definitions.
  • 03Supports declaring tensor shapes and launch bindings in a short header.
  • 04Includes a SKILLS.md guide for AI agents writing kernels.
  • 05Offers Docker setups for CUDA and ROCm environments.

Use cases

  • Prototyping a custom PyTorch operator on NVIDIA GPUs.
  • Porting or tuning operators for AMD GPUs using ROCm.
  • Letting an AI agent generate and test accelerator kernels.

Quick start

  1. 1

    Set up the recommended Docker image for CUDA or ROCm

  2. 2

    Run the Hello World example with the autort command

    autort -n hello_world_example --source=' @DEF_FUNC: input:float32[B, M] -> output:float32[B, M] @DEF_BIND: ~B~:1, ~%~:1024 void main() { if (int(blockIdx.x) == 0 && int(threadIdx.x) == 0) printf("(autort) Hello World!\n"); }'

Things to know

  • The README does not give a package-manager install command, so setup relies on the recommended Docker images.
  • Requires a CUDA or ROCm accelerator environment.
  • The README points to deprecated manual and legacy docs for earlier versions.

In collections

Topics

#compiler#pytorch#cuda#rocm#gpu#kernel-generation#operator-optimization

FAQ

What is antares?
AutoRT is a compiler tool that helps developers create, benchmark and optimize PyTorch operators for their own accelerators. AutoRT, the next generation of Microsoft's Antares project, is a compiler solution for runtime users who want to write, benchmark and tune operators for PyTorch on their own accelerators. Kernels are written as CUDA or HIP C++ function bodies, with a small header declaring input and output tensor shapes and launch bindings.
Is antares free to use? What license does it have?
antares is open source under the Other license. Check the license terms before using it in commercial products.
Is antares still maintained?
Actively maintained. The last commit to antares was on Oct 23, 2026.
What can I use antares for?
Prototyping a custom PyTorch operator on NVIDIA GPUs. Porting or tuning operators for AMD GPUs using ROCm. Letting an AI agent generate and test accelerator kernels.
How do I install antares?
Set up the recommended Docker image for CUDA or ROCm Run the Hello World example with the autort command: autort -n hello_world_example --source=' @DEF_FUNC: input:float32[B, M] -> output:float32[B, M] @DEF_BIND: ~B~:1, ~%~:1024 void main() { if (int(blockIdx.x) == 0 && int(threadIdx.x) == 0) printf("(autort) Hello World!\n"); }'
Where can I get antares?
The source code and installation instructions are on GitHub: https://github.com/microsoft/antares

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects