What changed
AMD has released the geometric-nn-ops library, a standalone PyTorch library that provides optimized Triton kernels for triangle operations used in AI/ML models, particularly those involved in protein-folding tasks like AlphaFold3. The library includes a public API, a dispatch mechanism to choose between Triton and PyTorch paths, and a compatibility package to ensure backward compatibility with existing code.
What this means in practice
The geometric-nn-ops library is designed to reduce memory usage and computational cost for triangle operations, which are critical in models like OpenFold3. These operations involve summing over a third token k for each pair (i, j), leading to a cubic growth in computational cost with respect to the number of tokens N. The library's triangle attention kernel, derived from OpenFold3's implementation, uses a flash-attention-style approach with online softmax and recomputation in the backward pass to minimize memory usage. In testing on an AMD Instinct MI355X GPU, the library reduced memory usage by a factor of about 69 for the forward pass and 9.5 for both forward and backward passes compared to a direct PyTorch implementation.
Limitations and availability
The library is available as two packages: geometric-nn-ops-torch, which contains the kernels and their direct API, and hipequivariance-ops-torch, an optional compatibility shim for existing code. The supported ROCm, PyTorch, and GPU combinations are listed in the repository README. The post covers AMD Instinct MI300X, MI325X, MI350X, and MI355X GPUs. The library is intended for use with models that require triangle operations, such as AlphaFold3-style co-folding models. The supplied announcement does not specify the exact release date or availability beyond the current release.