-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lmp: support input mapping for single process dpa2 model inference #3576
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #3576 +/- ##
==========================================
- Coverage 77.48% 77.48% -0.01%
==========================================
Files 432 432
Lines 37182 37216 +34
Branches 1620 1622 +2
==========================================
+ Hits 28812 28837 +25
- Misses 7502 7510 +8
- Partials 868 869 +1 ☔ View full report in Codecov by Sentry. |
@@ -469,6 +469,11 @@ def get_nnei(self) -> int: | |||
"""Returns the total number of selected neighboring atoms in the cut-off radius.""" | |||
return self.atomic_model.get_nnei() | |||
|
|||
@torch.jit.export | |||
def get_ntypes(self) -> int: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all models are made from the atomic model. This method should be added into the BaseModel.
@@ -551,7 +557,7 @@ void PairDeepMD::compute(int eflag, int vflag) { | |||
(numb_models > 1 && (out_freq > 0 && update->ntimestep % out_freq == 0)); | |||
if (do_ghost) { | |||
deepmd_compat::InputNlist lmp_list(list->inum, list->ilist, list->numneigh, | |||
list->firstneigh); | |||
list->firstneigh, mapping); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If mapping is only correct for the serial run, we may only pass mapping when the number of ranks is 1 to prevent incorrect results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A test is required.
No description provided.