TorchTLX brings GPU-specific kernels to TorchInductor
PyTorch introduced TorchTLX, integrating architecture-specific TLX kernels and expanded fusion into TorchInductor for NVIDIA Hopper and Blackwell and AMD Instinct MI300X, MI350X and MI450X GPUs. The project adds specialized GEMM and attention templates, architecture-aware fusion and safe kernel selection to the torch.compile path; PyTorch reports up to 1.2x speedups from specialized templates and up to 1.5x from richer fusion, but these are vendor-reported results.
TorchTLX gives PyTorch users a way to access architecture-specific GPU optimizations through TorchInductor while keeping most of the PyTorch 2 compiler stack hardware-agnostic.
TL;DR
- TorchTLX brings architecture-specific TLX kernels and richer fusion capabilities into TorchInductor across NVIDIA (Hopper/Blackwell) and AMD (Instinct MI300X/MI350X/MI450X) GPUs.
- Integration: TorchTLX extends TorchInductor’s kernel selection and fusion capabilities, providing a faster path to leverage new GPU capabilities in torch.compile;
- Benchmarking: The presented benchmarks show up to 1.2x speedups from architecture-specific GEMM and attention templates and up to 1.5x from richer fusion;
- Scalability: Reusable templates and fusion mechanisms extend optimizations across workloads and accelerate next-gen GPU bring-up.
Why TorchTLX
Figure-1: why TorchTLX?
Getting the most out of modern GPUs increasingly requires architecture-specific execution strategies. TLX lets us quickly expose new hardware capabilities and optimize specialized kernels, but incorporating those optimizations into PT2 requires deeper integration with TorchInductor.
PT2 has traditionally focused on graph-level optimization while relying on Triton to provide competitive kernels underneath. As we push further on performance, the default kernel performance is no longer always enough. TLX, as a low-level extension of Triton, gives us a way to introduce architecture-specific optimizations without giving up the higher-level PT2 compiler stack.
#PyTorch#TorchTLX#TorchInductor#torch.compile#TLX#NVIDIA#NVIDIA Hopper#NVIDIA Blackwell#AMD#AMD Instinct MI300X#AMD Instinct MI350X#AMD Instinct MI450X