xnn.gnn.fast.painn#
Fast path of the PaiNN message block (Triton kernels).
The reference message block gathers phi(s_j) and v_j to the edges,
multiplies them with the filters and directions and sums the products onto the
centers as separate tensor operations, each writing an (E, F) or
(E, 3, F) tensor that autograd keeps for the backward pass. Here the network
phi and the filters stay as they are (atom-wise layers and one matrix product
for all blocks), and one kernel per block gathers, multiplies and adds the
messages onto the centers: no edge-sized tensor is written. The backward pass is
one kernel that adds the gradients of phi(s) and v onto the neighbors and
writes those of the filters and directions.
The gradient reaches the features, the filters and the directions (so forces,
stress and, through phi and the filters, the weights). The backward kernel
is itself differentiable, through one more kernel of the same form, so the
second derivatives of a force loss run fused as well and training takes the
kernels too.
Module Attributes
Edge counts above which |
|
every size as well, on the same GPUs. |
Functions
|
Triton kernels on a CUDA device in float32 or float64. |