Skip to content

Conversation

@Microve
Copy link
Contributor

@Microve Microve commented Oct 13, 2024

Summary:
In compiled region, instead of calling dist.Work.wait(), we will call torch.ops._c10d_functional.wait_tensor() on the dist.Work's output tensor. This way, we can capture the wait_tensor() op within the torch.compile graph (instead of graph-breaking on dist.Work.wait()), and the tensor will be waited on properly within the graph.

This diff also depends on pytorch/pytorch#137763 to function properly.

Differential Revision: D64275115

@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 Oct 13, 2024
@facebook-github-bot
Copy link
Contributor

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

Microve pushed a commit to Microve/torchrec that referenced this pull request Oct 22, 2024
… region (meta-pytorch#2485)

Summary:

In compiled region, instead of calling `dist.Work.wait()`, we will call `torch.ops._c10d_functional.wait_tensor()` on the dist.Work's output tensor. This way, we can capture the `wait_tensor()` op within the torch.compile graph (instead of graph-breaking on `dist.Work.wait()`), and the tensor will be waited on properly within the graph.

This diff also depends on pytorch/pytorch#137763 to function properly.

Reviewed By: Microve

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

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

Microve pushed a commit to Microve/torchrec that referenced this pull request Oct 26, 2024
… region (meta-pytorch#2485)

Summary:

In compiled region, instead of calling `dist.Work.wait()`, we will call `torch.ops._c10d_functional.wait_tensor()` on the dist.Work's output tensor. This way, we can capture the `wait_tensor()` op within the torch.compile graph (instead of graph-breaking on `dist.Work.wait()`), and the tensor will be waited on properly within the graph.

This diff also depends on pytorch/pytorch#137763 to function properly.

Reviewed By: Microve

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

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

Microve pushed a commit to Microve/torchrec that referenced this pull request Nov 1, 2024
… region (meta-pytorch#2485)

Summary:

In compiled region, instead of calling `dist.Work.wait()`, we will call `torch.ops._c10d_functional.wait_tensor()` on the dist.Work's output tensor. This way, we can capture the `wait_tensor()` op within the torch.compile graph (instead of graph-breaking on `dist.Work.wait()`), and the tensor will be waited on properly within the graph.

This diff also depends on pytorch/pytorch#137763 to function properly.

Reviewed By: Microve

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

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

… region (meta-pytorch#2485)

Summary:

In compiled region, instead of calling `dist.Work.wait()`, we will call `torch.ops._c10d_functional.wait_tensor()` on the dist.Work's output tensor. This way, we can capture the `wait_tensor()` op within the torch.compile graph (instead of graph-breaking on `dist.Work.wait()`), and the tensor will be waited on properly within the graph.

This diff also depends on pytorch/pytorch#137763 to function properly.

Reviewed By: Microve

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

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

@TroyGarden TroyGarden closed this Jun 20, 2025
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.

4 participants