deepmd.pt_expt.kernels.cutile.sezm.indexing#
Coefficient layout of the reduced SO(2) basis as the cuTile kernels see it.
The canonical reduced layout is defined once, in deepmd.dpmodel.descriptor.dpa4_nn.indexing, and is reused here rather than restated. This module adds the two things the tile programming model needs on top of it: the structural non-zeros of the reduced rotation, which fix the coefficient numbering every generated kernel shares, and the power-of-two padded extents, which every tile must have.
Three layouts appear throughout the package and the kernels must agree on them exactly:
- full basis
(lmax + 1)^2spherical-harmonic coefficients ordered by(l, m), the layout of the node features and of the per-edge Wigner-D blocks.- reduced m-major
3 * lmax + 1rows atmmax == 1: them = 0degrees first, thenm = -1, thenm = +1. The mixing stack operates here, and the layout is block diagonal over|m|.- padded groups
each
|m|group widened to a power-of-two degree count. Padded degrees carry exact zeros in both the activation and the weight, so a padded contraction equals the exact one.
Classes#
Every extent the generated kernels of one block layout need. |
Functions#
| Return the reduced rows as indices into the full |
| Enumerate the structural non-zeros of the reduced rotation. |
Module Contents#
- deepmd.pt_expt.kernels.cutile.sezm.indexing.m_major_index(lmax: int, mmax: int = 1) list[int][source]#
Return the reduced rows as indices into the full
(lmax + 1)^2basis.
- deepmd.pt_expt.kernels.cutile.sezm.indexing.rotation_pairs(lmax: int, mmax: int = 1) list[tuple[int, int]][source]#
Enumerate the structural non-zeros of the reduced rotation.
The Wigner-D matrix is block diagonal in the degree, so projecting onto the reduced rows couples reduced row
ronly to the full-basis rows of its own degree. The returned order defines the coefficient numbering used by every generated kernel that touches the rotation.