Skip to content

Fix AsyncTP enabling#3869

Open
jenniew wants to merge 1 commit into
pytorch:mainfrom
jenniew:fix_asynctp
Open

Fix AsyncTP enabling#3869
jenniew wants to merge 1 commit into
pytorch:mainfrom
jenniew:fix_asynctp

Conversation

@jenniew

@jenniew jenniew commented Jul 6, 2026

Copy link
Copy Markdown

After we set enable_async_tensor_parallel in torchtitan, it would run micro_pipeline_tp_pass to fuse_all_gather_matmul and fuse_matmul_reduce_scatter. fuse_all_gather_matmul and fuse_matmul_reduce_scatter would check is_symm_mem_enabled_for_group is True or False. If is_symm_mem_enabled_for_group is False, fuse_all_gather_matmul and fuse_matmul_reduce_scatter would not replace matched patterns with torch.ops.symm_mem.fused_all_gather_matmul and torch.ops.symm_mem.fused_scaled_matmul_reduce_scatter.
In torchtitan, we haven't enabled symm_mem_enabled_for_group during initialization, so the check would be fail, and symmetric fused APIs would not be used.
This PR is to enable symm_mem_enabled_for_group during the torchtitan trainner initialization.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 6, 2026
@pytorch-bot

pytorch-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@fegin

fegin commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@jenniew pytorch/pytorch#172163, calling symm_mem_enabled_for_group should no longer be required. Have you verified that with this call, you can get all patterns matched?

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

Labels

ciflow/8gpu CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants