Skip to content

Conversation

@BoyuanFeng
Copy link
Contributor

Summary:
Previously, enable cudagraph leads to errors on AUCMetricComputation.

The root cause is that model forward output tensors predictions, labels, weights, and grouping_keys
got overwritten by the next CUDAGraph replay. This diff fixes the issue by clone these tensors before they are overwritten. The overhead should be small since these tensors only have shape (n_task, n_examples).

Differential Revision: D74293458

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 7, 2025
@facebook-github-bot
Copy link
Contributor

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

BoyuanFeng added a commit to BoyuanFeng/torchrec that referenced this pull request May 15, 2025
Summary:

Previously, enable cudagraph leads to [errors](https://fb.workplace.com/groups/1075192433118967/permalink/1661777797793758/) on AUCMetricComputation.

The root cause is that model forward output tensors `predictions`, `labels`, `weights`, and `grouping_keys`
 got overwritten by the next CUDAGraph replay. This diff fixes the issue by clone these tensors before they are overwritten. The overhead should be small since these tensors only have shape `(n_task, n_examples)`.

Reviewed By: TroyGarden

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

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

Summary:
Pull Request resolved: meta-pytorch#2951

Previously, enable cudagraph leads to [errors](https://fb.workplace.com/groups/1075192433118967/permalink/1661777797793758/) on AUCMetricComputation.

The root cause is that model forward output tensors `predictions`, `labels`, `weights`, and `grouping_keys`
 got overwritten by the next CUDAGraph replay. This diff fixes the issue by clone these tensors before they are overwritten. The overhead should be small since these tensors only have shape `(n_task, n_examples)`.

Reviewed By: iamzainhuda, TroyGarden

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

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

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants