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

Collect more info on cuduEventRecord for stream wait sync events #808

Closed
wants to merge 1 commit into from

Conversation

briancoutinho
Copy link
Contributor

Summary:

Overview

To effectively understand synchronization due to CUDA events we also need to track CUDA event record calls and which CUDA event record call the sync occurss on.
Thus when an event synchronization occurs we track

  1. We can figure out which cudaEventRecord() this sync took place on
  2. Based on that we know which kernel/memcpy launch was recorded by the event, this will typically be the previous kernel/memcpy launch in runtime.

CUPTI' CUDA Event record tells us the correlation ID of the CUDA record documentation

uint32_t CUpti_ActivityEvent::correlationId [inherited]
The correlation ID of the event. Use of this ID is user-defined, but typically this ID value will equal the correlation ID of the kernel for which the event was gathered.

In this change

  • Enable logging cuda Event Record Runtime events (and event sychronize calls too).
  • Track the correlation ID for CUPTI Event records as shown above.
  • In the CUPTI Stream Wait event we emit the correlation

Reviewed By: anupambhatnagar, davidberard98

Differential Revision: D49694339

@facebook-github-bot
Copy link
Contributor

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

…orch#808)

Summary:

## Overview
To effectively understand synchronization due to CUDA events we also need to track CUDA event record calls and which CUDA event record call the sync occurss on.
Thus when an event synchronization occurs we track
1. We can figure out which cudaEventRecord() this sync took place on
2. Based on that we know which kernel/memcpy launch was recorded by the event, this will typically be the previous kernel/memcpy launch in runtime.


CUPTI' CUDA Event record tells us the correlation ID of the CUDA record [documentation](https://docs.nvidia.com/cupti/annotated.html#structCUpti__ActivityEvent)
```
uint32_t CUpti_ActivityEvent::correlationId [inherited]
The correlation ID of the event. Use of this ID is user-defined, but typically this ID value will equal the correlation ID of the kernel for which the event was gathered.
```

## In this change
* Enable logging cuda Event Record Runtime events (and event sychronize calls too).
* Track the correlation ID for CUPTI Event records as shown above.
* In the CUPTI Stream Wait event we emit the correlation

Reviewed By: anupambhatnagar, davidberard98

Differential Revision: D49694339
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 4df86b0.

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.

None yet

2 participants