8000 Avoid calling fallback directly for symmetric memory tests by fegin · Pull Request #153520 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Avoid calling fallback directly for symmetric memory tests #153520

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

Open
wants to merge 1 commit into
base: gh/fegin/306/base
Choose a base branch
from

Conversation

fegin
Copy link
Contributor
@fegin fegin commented May 14, 2025

Stack from ghstack (oldest at bottom):

Since we can just use _test_mode to dispatch the calls, we should use this method to also verify the function signature is consistent.

cc @H-Huang @awgu @wanchaol @fduwjj @wz337 @wconstab @d4l3k

[ghstack-poisoned]
fegin added a commit that referenced this pull request May 14, 2025
Since we can just use _test_mode to dispatch the calls, we should use this method to also verify the function signature is consistent.


ghstack-source-id: 4cd25df
Pull-Request-resolved: #153520
Copy link
pytorch-bot bot commented May 14, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/153520

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 1 New Failure

As of commit eff8f67 with merge base a13c8f2 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added oncall: distributed Add this issue/PR to distributed oncall triage queue topic: not user facing topic category labels May 14, 2025
@fegin fegin requested review from kwen2501 and fduwjj May 14, 2025 05:47
Comment on lines +367 to +370
ag_output_vec = []
mm_outputs_vec = []
for context in test_contexts:
with context():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it seems a little bit obscure to wrap the test in a loop (and use vector).

Since there is only 1 special context here, how about:

    ag_output_0, mm_outputs_0 = torch.ops.symm_mem.fused_all_gather_matmul(
        A_shard, Bs, gather_dim=gather_dim, group_name=group.group_name
    )

    with _test_mode():
        ag_output_1, mm_outputs_1 = torch.ops.symm_mem.fused_all_gather_matmul(
            A_shard, Bs, gather_dim=gather_dim, group_name=group.group_name
        )

    assert torch.allclose(ag_output_0, ag_output_1)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Like you did for the other test below)

Sign up for free to join this conversation on 6776 GitHub. Already have an account? Sign in to comment
Labels
oncall: distributed Add this issue/PR to distributed oncall triage queue topic: not user facing topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0