feat: add optional MACE cuEquivariance training#129
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #129 +/- ##
==========================================
- Coverage 80.97% 78.52% -2.46%
==========================================
Files 12 12
Lines 1472 1574 +102
==========================================
+ Hits 1192 1236 +44
- Misses 280 338 +58 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
enable_cueqMACE model parameterCuEquivarianceConfigintoScaleShiftMACEwhen requesteddense_edge_indexfake registration when running source Python against an older installed OP libraryBenchmark
Installed cuEquivariance packages:
cuequivariance==0.10.0cuequivariance-torch==0.10.0cuequivariance-ops-torch-cu12==0.10.0Command shape:
Environment:
Results:
The stable training throughput improves by about 10%, but total wall time is worse for this short job because the first cuEquivariance batch takes about 30 s for initialization/compilation.
Notes
With MACE 0.3.15 and cuEquivariance 0.10.0, the cuEquivariance MACE submodel does not script cleanly due to the conv-fusion wrapper (
SegmentedPolynomial.original_forward). This PR keeps training usable by falling back to eager mode whenenable_cueqis true. This does not imply frozen TorchScript inference support.Tests
python -m ruff check deepmd_gnn/mace.py deepmd_gnn/argcheck.py deepmd_gnn/edge.pysrun --gres=gpu:1 dp --pt train input.jsonfor baseline andenable_cueq=trueKnown local test limitations:
tests/test_pt_expt.pydoes not collect with localdeepmd-kit==3.1.3because_needs_with_comm_artifactis unavailable.tests/test_mace_comm.pyhas one dtype assertion failure unrelated to the cuEquivariance path.