# facebookincubator/AITemplate

AITemplate is a Python framework which renders neural network into high performance CUDA/HIP C++ code. Specialized for FP16 TensorCore (NVIDIA GPU) and MatrixCore (AMD GPU) inference.

Repository: https://github.com/facebookincubator/AITemplate
Canonical: https://ross.abutalabs.com/products/aitemplate
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2026-08-07T07:10:39+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 96, release rhythm 8, longevity 100
- inputs: {"age_days": 1510, "days_push": 26, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4724, forks 388 (observed 2026-08-28T04:08:57.559703+00:00)

## What it is
AITemplate is a Python framework that compiles deep neural networks into high-performance CUDA (NVIDIA) or HIP (AMD) C++ code for fast fp16 inference. It generates self-contained binaries with advanced horizontal, vertical, and memory kernel fusions without depending on third-party libraries like cuDNN or TensorRT.

## Use cases
- serve fp16 transformer models like BERT or Stable Diffusion at near-roofline GPU performance
- compile neural networks into portable self-contained inference binaries
- run the same model efficiently on both NVIDIA and AMD GPUs
- fuse GEMM, LayerNorm, and elementwise ops into single GPU kernels
- deploy inference without PyTorch or CUDA runtime library dependencies
- add custom fused operators via simple Python codegen extensions

## When to choose
- you need maximum fp16 inference throughput on NVIDIA or AMD GPUs
- you want self-contained binaries free of cuDNN/cuBLAS/TensorRT dependencies
- your models (ResNet, BERT, ViT, Stable Diffusion) benefit from aggressive kernel fusion
- you need one framework targeting both CUDA and HIP

## When to avoid
- you need training or gradient support - it is inference-only
- you need fp32/int8 quantization or CPU inference
- you want a mature, actively evolving ecosystem - consider alternatives like TensorRT or torch.compile
- your workflow depends on dynamic shapes beyond its supported range

## Facets
- artifact type: framework
- maturity: maintenance
- function: deep-learning, llm-inference, compiler, gpu-computing
- domain: deep-learning, machine-learning, gpu-computing, performance
- platform: python
- tags: cuda, hip, amd-gpu, nvidia-gpu, fp16, tensorcore, inference-serving, code-generation, kernel-fusion, linux, gpu

## Member repositories
- facebookincubator/AITemplate (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:57.559703+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-29T18:19:04.686408+00:00, confidence not recorded.
  - readme: https://github.com/facebookincubator/AITemplate (fetched 2026-08-28T04:08:57.559703+00:00, sha 665f06a48a04)
- Data as of 2026-08-30T08:39:29.467469+00:00.
