xnn.gnn.fast.schnet_kernels#

Triton kernels and autograd functions of the SchNet fast path (see xnn.gnn.fast.schnet).

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

One program handles one atom and walks its edges in a sorted order (compressed rows, xnn.common.models.csr: by center for the sums onto centers, by neighbor for the sums onto neighbors and the per-edge gradients), a chunk of edges at a time, accumulating in registers: no atomic adds, and the same result in every run.

Module Attributes

SHAPES

a sweep on three GPUs chose 1024 values over two warps in float32 and 512 values over one warp in float64, within a fifth of the best shape of every kernel on every GPU.

Functions

cfconv(h, z, envelope, edge_index[, activated])

The fused continuous-filter convolution of one block (see xnn.gnn.fast.schnet).

Classes

CFConvFunction(*args, **kwargs)

out[i] = sum_{e: dst_e = i} h[src_e] * act(z_e) * env_e.

CFConvGradFunction(*args, **kwargs)

The backward of CFConvFunction (the gradients of h, z and the envelope for the incoming gradient g), differentiable once more.