xnn.gnn.fast.cace_kernels#

Triton kernels and autograd functions of the CACE fast path (see xnn.gnn.fast.cace).

Imported only when the fast path runs, so that triton is needed only there.

The Ar messages summed onto the centers, m[i, a, s] = sum_{e: dst_e = i} A[src_e, a, s] D[e, g(a), s] (a the angular entry, g(a) its order, s the radial and edge channels), take one program per center over its edges in center order. Their gradients take one program per center as well (its gradient row read once): per edge dD[e, g, s] = sum_{a: g(a) = g} w[i, a, s] A[src_e, a, s] and the edge’s share u[e, a, s] = w[i, a, s] D[e, g(a), s], then one program per neighbor sums the shares of its edges (compressed rows, xnn.common.models.csr). No atomic adds: the sums come out the same in every run.

Functions

message_sums(a, d, groups, edge_index)

The Ar messages summed onto the centers (see xnn.gnn.fast.cace).

Classes

MessageGradsFunction(*args, **kwargs)

The gradients of MessageSumsFunction for the incoming w: bilinear like the sums, so its own derivatives are the two functions again.

MessageSumsFunction(*args, **kwargs)

m[i] = sum_{e: dst_e = i} A[src_e] * D_e[g(a)], differentiable at any order.