Skip to content
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

pt: make get_data non-blocking #3422

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

njzjz
Copy link
Member

@njzjz njzjz commented Mar 6, 2024

to(DEVICE) is cpu-blocking but to(DEVICE, non-blocking=True) is not blocking. This improves performance by at least 0.1s/100 steps.

Before, get_data is blocking:

1709698811097

1709698811150

After, get_data is not blocking:
1709698811122
1709698811169

The subsequent blocking is phys2inter (via torch.linalg.inv).

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 76.95%. Comparing base (b0171ce) to head (f1e1ba6).
Report is 2 commits behind head on devel.

Files Patch % Lines
deepmd/pt/train/training.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            devel    #3422   +/-   ##
=======================================
  Coverage   76.94%   76.95%           
=======================================
  Files         423      423           
  Lines       35878    35883    +5     
  Branches     1620     1620           
=======================================
+ Hits        27607    27612    +5     
  Misses       7403     7403           
  Partials      868      868           

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

@wanghan-iapcm wanghan-iapcm added this pull request to the merge queue Mar 8, 2024
Merged via the queue into deepmodeling:devel with commit 268591c Mar 8, 2024
48 checks passed
@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.

4 participants