source: pytorch blog: triton plugin extensions: enabling tlx and custom compiler passes out of the box
level: technical
pytorch-triton 3.7 ships a plugin extensions system that lets developers load custom compiler passes, mlir dialects, and dsl extensions into upstream triton at runtime. plugins are shared libraries discovered via the triton_plugin_paths environment variable, requiring no recompilation of triton. hooks in the compiler pipeline allow inserting, disabling, or replacing passes at any lowering stage, from ttir down to ptx or amdgcn. the system supports per-kernel toggling and custom cache management.
meta's triton language extensions (tlx) is the first major consumer, now enabled out of the box. tlx provides hardware-aware ops for explicit shared memory allocation, asynchronous loads, and software pipelining, enabling persistent gemm kernels. on nvidia h100, tlx matches or beats cublas on large matrix shapes, with up to 3.7% higher tflops. on amd mi350, tlx delivers 12–15% higher tflops than rocblas across tested sizes. the plugin path generates identical code to the previous fork-based approach.
a production validation on a trimul multiplicative update kernel showed a 1.61x speedup over a cublas plus torch.compile baseline on h100, using warp-specialized persistent gemm from tlx. the plugin system eliminates the maintenance burden of maintaining a triton fork, allowing teams to stay on the latest upstream release while using custom optimizations. installation is straightforward via pip and setting the plugin path environment variable.
why it matters: this lets ai engineers use custom high-performance kernels with stock triton, avoiding fork maintenance and enabling faster iteration on hardware-specific optimizations.
source: pytorch blog: triton plugin extensions: enabling tlx and custom compiler passes out of the box