Fix C10_CUDA_CHECK for failing to capture last cuda error occasionally #93192
Closed
xwang233 wants to merge 2 commits intopytorch:masterfrom
Closed
Fix C10_CUDA_CHECK for failing to capture last cuda error occasionally #93192xwang233 wants to merge 2 commits intopytorch:masterfrom
xwang233 wants to merge 2 commits intopytorch:masterfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/93192
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 1ea494e: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Collaborator
Author
ezyang
approved these changes
Jan 28, 2023
Collaborator
Author
|
@pytorchbot merge -g |
Collaborator
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
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.
Fix C10_CUDA_CHECK for failing to capture last cuda error occasionally
This error was accidentally introduced by #92227, which was trying to fix_ #91758 as introduced in #85256.
The unit test
TestCuda.test_events_multi_gpu_elapsed_timehas been failed since that PR got merged (in cuda 11.8 and cuda 12.0). That test requires >=2 GPU, so it's probably not tested in the OSS CI?E.g. in https://github.com/pytorch/pytorch/actions/runs/4026926691/jobs/6922406192
The original C10_CUDA_CHECK before #85256 has an extra
cudaGetLastErrorthat captures those cuda errors, https://github.com/pytorch/pytorch/pull/85256/files#diff-0823e63e781acf56e93a5553ed7feee0db0bda05d86e2560c7b80e87e32e0024L41-L42This extra
cudaGetLastErrorwas originally introduced in #17337. As commented here https://github.com/pytorch/pytorch/pull/17337/files#r259104503