News

PyTorch details TorchTLX kernel integration with TorchInductor

Existing `torch.compile` calls can use GPU-specific templates through a compatible FBTriton build or a matching Triton plugin.

D
Dec 1, 2026 · 2 min read

PyTorch detailed how TorchTLX integrates with TorchInductor, the default compiler behind torch.compile. A compatible FBTriton build or a matching uTLX plugin lets existing model code use kernel templates tuned for specific GPUs. Inductor can combine operations in one GPU kernel, such as adding bias and applying ReLU as a Blackwell matrix multiplication kernel writes its output.

PyTorch 2.15.0 includes a hook for the template registry. With stock Triton alone, TorchTLX defaults to off and the registry is absent. FBTriton revision 57abd3ffb020 defaults to allow unless overridden. The plugin exposes its registry at Python startup.

TORCHINDUCTOR_TLX_MODE=allow adds eligible TLX templates to the compiler’s choices. With force, Inductor uses TLX templates where eligible. Eligibility depends on the GPU and the input’s data type, shape, layout and alignment.

The cited FBTriton revision provides matrix multiplication templates for NVIDIA Hopper and Blackwell and AMD Instinct MI300X and MI350X. Its FlexAttention templates cover eligible short-query backward workloads on Hopper, forward workloads on Blackwell and both passes on MI350X.

The fork also has an MI450X forward attention template for eligible FP16 or BF16 prefill with a head dimension of 128. PyTorch lists MI450X as a target. Its benchmark appendix lists H100, B200, MI300X and MI350X.

The uTLX 3.9.0.post6 FlexAttention templates cover eligible Blackwell forward and MI350X forward and backward workloads. That version omits the fork’s Hopper backward and MI450X forward templates.

On development builds, the Meta and AMD contributors reported an H100 kernel time of 36.5 microseconds for a residual connection and two LayerNorm operations with an intermediate kept on chip, versus 48.6 microseconds for the original kernel that wrote and reread it in GPU global memory. They reported a 1.33× speedup for fused TLX in an FP16 MI300X ranking-model test at M=4662, N=18688 and K=256 versus hipBLASLt with separate elementwise operations. Both MI300X runs had max_autotune off.

The authors give representative configurations and leave the exact benchmark builds unspecified. Independent replication remains unconfirmed.

PyTorch’s FBTriton setup guide specifies a source build of FBTriton 3.8 or later with the registry. The swap requires no PyTorch rebuild. The stable FBTriton 3.7.4 wheel predates the registry.

Triton 3.9.0 documents external plugin loading. The triton-utlx and triton-utlx-rocm 3.9.0.post6 wheels pair with triton and triton-rocm 3.9.x, respectively, on Linux x86-64 with glibc 2.28 or later. A plugin source build requires LLVM and MLIR development tools and a compatible Triton build with extension support.

More news