pt: fix se_a type_one_side performance degradation#3361
Merged
wanghan-iapcm merged 1 commit intodeepmodeling:develfrom Feb 29, 2024
Merged
pt: fix se_a type_one_side performance degradation#3361wanghan-iapcm merged 1 commit intodeepmodeling:develfrom
wanghan-iapcm merged 1 commit intodeepmodeling:develfrom
Conversation
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## devel #3361 +/- ##
=======================================
Coverage 75.85% 75.86%
=======================================
Files 416 416
Lines 34908 34914 +6
Branches 1614 1614
=======================================
+ Hits 26480 26486 +6
Misses 7560 7560
Partials 868 868 ☔ View full report in Codecov by Sentry. |
wanghan-iapcm
approved these changes
Feb 29, 2024
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Feb 29, 2024
The code in this PR is ugly, but applying a mask is causing performance degradation for ~3 ms/step. When applying a mask, `aten::nonzero` has a high host time, as it causes host-device synchronization:  After fixing:  See pytorch/pytorch#12461 for more information. Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Collaborator
|
Is the exclude_mask has side effect on the performance? |
Member
Author
It has a different problem. It seems the integer index is slow: pytorch/pytorch#15245 I haven't tested it. |
Closed
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.
The code in this PR is ugly, but applying a mask is causing performance degradation for ~3 ms/step.
When applying a mask,

aten::nonzerohas a high host time, as it causes host-device synchronization:After fixing:

See pytorch/pytorch#12461 for more information.