Repository navigation
[DistMuon] Balance Owned and sharded compute placement - #5468
Merged
tianyu-l merged 10 commits intoOct 29, 2026
Merged
Conversation
Schedule original compute chunks without a unit-count gate or per-parameter rank exclusivity. Pack explicit regions through one shared route builder while preserving each original Newton-Schulz batch. Validated with CPU regressions and CPU/single-device bitwise probes. Previously reported multi-GPU benchmarks apply to earlier code; this revision still needs fresh distributed training, performance, and peak-memory validation.
JavaZeroo
marked this pull request as ready for review
October 19, 2026 02:06
JavaZeroo
requested review from
fegin,
tianyu-l,
wconstab and
wwwjn
as code owners
October 19, 2026 02:06
|
|
Contributor
Author
|
@weifengpy could you take a look when you have time? This is part 2 of #5278: one LPT over Owned matrices and Shard/BlockShard chunks, counting the work that stays local. Checked against main on 8x H20 with the K3 debugmodel: loss, grad_norm and Muon states are bitwise equal over 40 steps; DistMuon 85.9 -> 68.2 ms, optimizer step 103.5 -> 85.8 ms. |
JavaZeroo
added a commit
to JavaZeroo/torchtitan
that referenced
this pull request
Oct 26, 2026
…mit is reachable
Contributor
|
thanks for improving this! I will do some detail check on the coding details for @shuhuayu, this is should close the memory balancing gap |
tianyu-l
approved these changes
Oct 29, 2026
This was referenced Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2 of #5278.
Owned-only balancing ignored other work in the same bucket. This PR accounts for fixed local work and jointly assigns unchanged Owned/Shard/BlockShard chunks using explicit
(rank, region)mappings. Multiple chunks can share a rank; a common region planner packs them while preserving their original NS views. Matrix boundaries, NS kernels, and parameter/momentum storage remain unchanged.K3 real-training validation
K3 debugmodel, CC12M test data, 8xH100, EP8/FSDP8, sequence length 512; full forward/backward/optimizer. Comparing main
8a3f5bcwith this PRc8ea2ea: two completed pairs of 40 steps, excluding 10 warmup steps. The planned third pair was incomplete and is excluded.Medians across the two trials: optimizer metrics use per-step max-rank CUDA-event medians; iterations use max-rank synchronized wall time over 30 steps, divided by 30. Results are specific to this debug configuration.
Correctness
Seed 42 with deterministic mode: per-step loss and grad_norm match bitwise, as do checked Muon parameter/momentum states. All 8 FlexShard CPU tests pass, including the extended placement and plan-reuse regression.