Skip to content

pt: improve nlist performance#3425

Merged
wanghan-iapcm merged 3 commits intodeepmodeling:develfrom
njzjz:pt-opt-nlist
Mar 7, 2024
Merged

pt: improve nlist performance#3425
wanghan-iapcm merged 3 commits intodeepmodeling:develfrom
njzjz:pt-opt-nlist

Conversation

@njzjz
Copy link
Copy Markdown
Member

@njzjz njzjz commented Mar 6, 2024

  1. use inv_ex instead of inv. inv_ex does not check errors. We can assume the input is correct.
  2. pass CPU box for torch.arange;
  3. avoid torch.tensor.

1. use inv_ex instead of inv. `inv_ex` does not check errors. We can assume the input is correct.
2. copy nbuff from device to host once other than 6 times (although copying once is still slow);
3. avoid torch.tensor.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@njzjz njzjz requested a review from wanghan-iapcm March 6, 2024 08:04
@github-actions github-actions Bot added the Python label Mar 6, 2024
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.98%. Comparing base (278e6b8) to head (376185b).
Report is 2 commits behind head on devel.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3425      +/-   ##
==========================================
+ Coverage   76.95%   76.98%   +0.03%     
==========================================
  Files         423      423              
  Lines       35883    35956      +73     
  Branches     1620     1621       +1     
==========================================
+ Hits        27612    27679      +67     
- Misses       7403     7409       +6     
  Partials      868      868              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
(cherry picked from commit a560f549b340c90af88b8831113445b17a0863c0)
Comment thread deepmd/pt/utils/nlist.py Outdated
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@wanghan-iapcm wanghan-iapcm added this pull request to the merge queue Mar 7, 2024
Merged via the queue into deepmodeling:devel with commit 2d48d1f Mar 7, 2024
@njzjz njzjz mentioned this pull request Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants