xnn.gnn.fast#
Fast paths of the equivariant GNN blocks (fused cuEquivariance kernels).
ConvTensorProduct (the message step of MACE and NequIP) and the
symmetric contraction of MACE have a fused GPU implementation next to their
reference one; FastPathModule explains the
contract and use_fast the choice. AUTO_POLICY holds the measured
size above which use_fast="auto" takes the kernels. The fused continuous-filter
convolution of SchNet and the fused message block of PaiNN (Triton kernels) live in
xnn.gnn.fast.schnet and xnn.gnn.fast.painn. The equivariant linear maps and
the element self-connection of MACE have plain-PyTorch fast paths in xnn.gnn.fast.linear.
Module Attributes
Edge counts above which |
|
the kernels pay off earlier than in evaluation, as the backward of a training step repeats the work the fixed cost is spread over. |
|
on an A100, A30, V100 and T4 the kernels were faster than the reference from a single small molecule on, in both precisions and both modes. |
Modules
Fast path of the AIMNet2 shell convolution (Triton kernels). |
|
Triton kernels and autograd functions of the AIMNet2 fast path (see |
|
Fast path of the Allegro tensor product (Triton kernels). |
|
Triton kernels and autograd function of the Allegro fast path (see |
|
Fast path of the CACE edge-basis sums (Triton kernels). |
|
Triton kernels and autograd functions of the CACE fast path (see |
|
Fast path of CGCNN: the network from the positions to the pooled atom features as one compiled stage. |
|
The message step of an equivariant convolution, with a fused fast path. |
|
Fast path of the DimeNet and DimeNet++ triplet interactions (Triton kernels). |
|
Fast path of the GemNet efficient bilinear layer (Triton kernels). |
|
Triton kernels and autograd functions of the GemNet fast path (see |
|
Equivariant linear maps of the MACE blocks, with a fast path in plain PyTorch. |
|
Fast path of MEGNet: the encoders, the blocks and the Set2Set readouts as compiled stages. |
|
Fast path of the PaiNN message block (Triton kernels). |
|
Triton kernels and autograd function of the PaiNN fast path (see |
|
Triton kernels of the fused hidden layers of a radial network (see |
|
Fast path of the SchNet continuous-filter convolution (Triton kernels). |
|
Triton kernels and autograd functions of the SchNet fast path (see |
|
The fast path of the MACE symmetric contraction (the product basis). |
|
Fast path of the TensorNet embedding and interaction layers (Triton kernels). |
|
Triton kernels and autograd functions of the TensorNet fast path (see |