Skip to content

Add umas_flash execution mode: fused Triton backbone for UMA inference - #2185

Open
ArcelliEmanuele wants to merge 3 commits into
facebookresearch:mainfrom
ArcelliEmanuele:umas-flash-backend
Open

ArcelliEmanuele wants to merge 3 commits into
facebookresearch:mainfrom
ArcelliEmanuele:umas-flash-backend

Conversation

@ArcelliEmanuele

Copy link
Copy Markdown

Adds a new execution mode, umas_flash, implementing the eSCN-MD backbone as a set of fused Triton kernels. Beyond the existing fast backends it avoids materializing the Wigner matrices, radial embeddings and rotated edge messages in HBM, so it cuts peak memory as well as runtime.

The backend is inference-only and is validated against a fixed model shape (lmax=2, mmax=2, and the UMA-S channel widths); anything outside that is rejected up front with an explanatory error rather than being silently mis-executed. It requires merge_mole=True.

Wigner rotations use a packed block-diagonal layout holding the 34 non-trivial entries of the l=1 and l=2 blocks, the l=0 scalar being identically 1.

Integration points are additive: a fused_backbone_features dispatch hook in escn_md.py, the backend registration in execution_backends.py, and a doc comment for the new mode in the inference settings.

Tests cover numerical agreement against the reference backend and the validation guards.

Adds a new execution mode, `umas_flash`, implementing the eSCN-MD
backbone as a set of fused Triton kernels. Beyond the existing fast
backends it avoids materializing the Wigner matrices, radial embeddings
and rotated edge messages in HBM, so it cuts peak memory as well as
runtime.

The backend is inference-only and is validated against a fixed model
shape (lmax=2, mmax=2, and the UMA-S channel widths); anything outside
that is rejected up front with an explanatory error rather than being
silently mis-executed. It requires merge_mole=True.

Wigner rotations use a packed block-diagonal layout holding the 34
non-trivial entries of the l=1 and l=2 blocks, the l=0 scalar being
identically 1.

Integration points are additive: a `fused_backbone_features` dispatch
hook in escn_md.py, the backend registration in execution_backends.py,
and a doc comment for the new mode in the inference settings.

Tests cover numerical agreement against the reference backend and the
validation guards. Three tests require a second GPU and skip otherwise.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@meta-cla meta-cla Bot added the cla signed label Sep 2, 2026
@wood-b
wood-b self-requested a review September 2, 2026 19:36
@wood-b wood-b added enhancement New feature or request minor Minor version release labels Sep 2, 2026
@mshuaibii
mshuaibii self-requested a review September 8, 2026 15:04
"merge_mole": True,
"activation_checkpointing": False,
"external_graph_gen": False,
"execution_mode": "umas_flash",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we explicitly test compile:True here as well? if both are valid settings we should test both.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed enhancement New feature or request minor Minor version release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants