xnn.common.models.csr#

Compressed rows of a pair list: the pairs sorted by center or by neighbor.

The fused kernels of SchNet, TensorNet and the AMOEBA/HIPPO induction run one program per atom over its pairs in one of these orders and accumulate in registers, so their sums need no atomic adds and come out the same in every run.

Functions

compressed(index, n)

The pairs sorted by index (stable) and the row pointers (n + 1,).

narrow_keys(index, n)

index as sort keys over n values: int32 when they fit, which halves the passes of the radix sort and, stable, gives the same order.

orderings(src, dst, n[, key])

The pairs by center and by neighbor: (order_dst, ptr_dst, order_src, ptr_src).