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

Omit CUDA sync events on unused CUDA streams #795

Closed
wants to merge 1 commit into from

Conversation

briancoutinho
Copy link
Contributor

Summary:
CUDA WaitforStream sync events can lead to a lot of verbosity in the traces.
It looks like PyTorch cycles through all the streams to add these wait calls but they are no-ops on stream that are not in active use.
{F1063309394}

This change will simply filter out WaitforStream events whenever a CUDA stream has not been used.

  • Track device, stream used in a set, this updated by an GPU kernel or memcpy or memset.
  • Filter waitforstream events.

Reviewed By: chaekit, davidberard98

Differential Revision: D47975637

Summary:
CUDA WaitforStream sync events can lead to a lot of verbosity in the traces.
It looks like PyTorch cycles through all the streams to add these wait calls but they are no-ops on stream that are not in active use.
 {F1063309394}

This change will simply filter out WaitforStream events whenever a CUDA stream has not been used.
* Track device, stream used in a set, this updated by an GPU kernel or memcpy or memset.
* Filter waitforstream events.

Reviewed By: chaekit, davidberard98

Differential Revision: D47975637

fbshipit-source-id: 367b1e0c7f41d1ee606d36cec0bb9441dd258c2b
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D47975637

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in f6c845e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants