Skip to content

Update sharding propagation given single-dim migration upstream - #489

Merged
aditvenk merged 1 commit into
mainfrom
aditvenk/stack/1
Jun 15, 2026
Merged

aditvenk merged 1 commit into
mainfrom
aditvenk/stack/1

Conversation

@aditvenk

@aditvenk aditvenk commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

PyTorch removed _mm_like_strategy when pytorch/pytorch#186667 migrated mm to single-dim strategy. Register AutoParallel's einsum strategy on the single-dim path and reuse _try_single_dim_strategy for expansion.

Pass user kwargs through to DTensor OpSchema so single-dim strategies that depend on keyword-only arguments can compute metadata correctly.

Authored with Claude.

stack-info: PR: #489, branch: aditvenk/stack/1
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 12, 2026
@aditvenk
aditvenk requested review from anshul-si, fmassa and pianpwk June 12, 2026 19:03
@aditvenk

Copy link
Copy Markdown
Contributor Author

CI won't pass till pytorch/pytorch#187199 gets into PyTorch nightly

@fmassa fmassa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

assert isinstance(input_metas, tuple)
assert len(input_metas) == 2, "Only two args to einsum supported for now"

# ignore strategies with Partial inputs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Interesting, so now we have a richer set of sharding placements for matmul ops which are propagated, right? We might want to change this in the future to allow for partial inputs as well, but let's keep things as is for now.

@aditvenk
aditvenk merged commit e988086 into main Jun 15, 2026
13 of 17 checks passed
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 Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants