Skip to content

[DistMuon] Test that packed chunks compute on the right rows - #5696

Draft
weifengpy wants to merge 2 commits into
gh/weifengpy/81/basefrom
gh/weifengpy/81/head
Draft

weifengpy wants to merge 2 commits into
gh/weifengpy/81/basefrom
gh/weifengpy/81/head

Conversation

@weifengpy

@weifengpy weifengpy commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Why

Since #5468, a rank can compute several chunks of one parameter, packed into one compute tensor. No test runs step() on that path: the CPU schedule test checks plan structure only, and no GPU test packs. A mismatch between the planner's packing order and the offsets DistMuon uses for its Newton-Schulz views would make Newton-Schulz run on the wrong rows, with no error, and still pass every existing test.

What changed

  • Extends the shared-bucket test from the previous PR, renamed test_shared_bucket_matches_per_parameter_buckets. It adds a compute-ready (3, 64, 64) parameter that only ranks 0-2 hold, so their fixed work pushes every other parameter's chunks onto rank 3. It also adds a BlockShard(dim=0, block_sizes=(4, 2)) parameter, so the packed chunks have different shapes.
  • The test asserts that a, b, c and blocks really pack onto rank 3 before comparing results, so it can't silently stop covering packing if placement changes.

Testing

  • The test passes on this stack (4 GPUs).
  • With DistMuon's views assigned in reverse packing order, a stand-in for a packing/view mismatch, it fails on layers.0.blocks. With equal-shaped chunks it would not catch that, which is why the blocks alternate 4 and 2 rows.

This PR was drafted with an AI assistant (Claude Code).

[ghstack-poisoned]
[ghstack-poisoned]

This branch has not been deployed

No deployments
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.

1 participant