Fuse compiled single-system periodic shifts - #2142
Open
mlazos wants to merge 1 commit into
Open
Conversation
Inductor lowers the fixed-width cell-offset matrix multiply as an external operation, preventing fusion with edge-vector construction. Express the three-column transform as scaled cell rows while Dynamo is tracing so Inductor can fuse it, while retaining the existing matrix multiply for eager execution. The matched UMA-S-1p2 internal-v3 endpoint improved by 0.098 ms GPU with external_graph_gen=False, merge_mole=True, static model compilation, and full dynamic CUDA graph replay. Test Plan: ``` CUDA_VISIBLE_DEVICES=0 TORCHINDUCTOR_CACHE_DIR=$PWD/agent_space/cache_shift_compile_test PYTHONPATH=$PWD/src:/data/users/mlazos/pytorch /home/mlazos/.conda/envs/pytorch-3.12/bin/python -m pytest -q tests/core/models/uma/test_compile.py::test_compile_single_system_external_graph /home/mlazos/.conda/envs/pytorch-3.12/bin/ruff check --ignore PT023,B905 src/fairchem/core/models/uma/escn_md.py tests/core/models/uma/test_compile.py git diff --check origin/main...HEAD ``` Pytest reported 1 passed before the process hit the previously observed CUDA interpreter-shutdown abort. Authored with assistance from Codex.
Contributor
Author
AI-Review
No verified issues found. |
mlazos
marked this pull request as ready for review
August 11, 2026 00:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
For a single system, Inductor currently lowers the fixed-width cell-offset
matrix multiply as an external operation. That prevents it from fusing with
the following edge-vector construction.
While Dynamo is tracing, express the three-column transform as scaled cell
rows so Inductor can fuse the work. Eager execution retains the existing
matrix multiply, and the multi-system path is unchanged.
Performance
Testing
Pytest reported
1 passed; the process subsequently hit the previouslyobserved CUDA interpreter-shutdown abort.
Authored with assistance from Codex.