cuequivariance-ops-torch - GPU Accelerated Torch Extensions for Equivariant Primitives
Actively maintained. Last release 6 days ago. A safe choice.
pip install cuequivariance-ops-torch-cu13README as published on PyPI with version 0.14.0.
cuequivariance-ops-torch
Introduction
cuequivariance_ops_torch provides CUDA kernels for the
cuEquivariance project's PyTorch
components. As such, it contains pytorch bindings to optimized kernels that
cuEquivariance's operations map down to. In general, we advice that you access
those kernels through cuEquivariance, but you may also find them useful on
their own.
Installation
Please install using either pip install cuequivariance-ops-torch-cu12 or
pip install cuequivariance-ops-torch-cu13 (depending on the CUDA toolkit
you wish to use).
Kernel Factory TriMul kernels
On CUDA 13 wheels, triangle_multiplicative_update runs prebuilt Kernel Factory (KF)
TriMul kernels for BF16 calls on the exact shapes each kernel was validated on, on
H100 SXM (80GB HBM3), H200, GH200 480GB, B200 and RTX PRO 6000 Blackwell (Server and
Workstation Edition). Every other call keeps the existing implementation. The kernels
ship as prepackaged cubins and need nothing extra; their outputs match the existing
implementation within its numerical tolerance, not bitwise. (Development builds may
register a kernel in its CuTe DSL JIT form; that needs nvidia-cutlass-dsl[cu13]==4.7.0
and apache-tvm-ffi==0.1.14.post0, which are not dependencies of the published package.
Without them, dispatch keeps the existing implementation.)
A call reaches KF only when the pair AND the module's parameters are BF16, or when FP32
inputs are passed with precision="bfloat16" (the op rounds them first). The automatic
mixed precision default, a BF16 pair with FP32 parameters (with or without BF16
autocast), keeps the existing implementation in 0.13 (an FP32-input KF variant is
BIO-1329).
In training, a second backward through one forward (retain_graph=True) recomputes the
forward and is exact in eager mode, but transiently needs about 1.9x the first
backward's memory. Replayed from a CUDA graph, such a second backward gives NaN
gradients by design (loud, never silently wrong; the first backward of every replay is
exact), where the existing implementation returns correct gradients. Double backward
(create_graph=True) raises.
Some KF kernels synchronise their thread blocks with software grid barriers and assume exclusive use of the GPU: under MPS sharing without SM partitions they can hang.