Skip to content

Fallback to single GPU if tp_group has size 1 - #314

Merged
skyw merged 4 commits into
mainfrom
skyw/fallback_tp_size_1
Oct 20, 2026
Merged

skyw merged 4 commits into
mainfrom
skyw/fallback_tp_size_1

Conversation

@skyw

@skyw skyw commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

There are cases where size 1 group is passed into newton_schulze_tp. Technically caller should never do that, but it is also trivial to guard here.

Signed-off-by: Hao Wu <skyw@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the previous finding is fixed and no new issues were found.

Summary

newton_schulz_tp now uses the single-GPU path when the process group has one member.

  • Newton–Schulz calls use the regular path when their TP group has one rank.

Reviews (3) · Last reviewed commit: "revert" · Reviewed by Greptile

Comment on lines +337 to 340
tp_size = get_pg_size(tp_group)
if partition_dim is None or tp_size == 1:
# Fallback path for non TP params.
return newton_schulz(x, steps, coefficient_type, use_syrk=use_syrk)

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.

P1 Two existing tests fail

Both error tests in tests/test_muon_utils.py:464-478 pass tp_group=None, so get_pg_size returns 1 and this branch returns normally instead of raising the expected ValueError. Update those tests to match the intended behavior, or keep the checks they expect.

skyw and others added 3 commits October 20, 2026 12:54
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
@skyw

skyw commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test dcc9903

@github-actions

Copy link
Copy Markdown

Test Results

   99 files  ±0    200 suites  ±0   2m 10s ⏱️ -2s
1 586 tests ±0  1 586 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 811 runs  ±0  3 811 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit dcc9903. ± Comparison against base commit d1b3de9.

@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@skyw
skyw merged commit bcf92ca into main Oct 20, 2026
31 checks passed
@skyw
skyw deleted the skyw/fallback_tp_size_1 branch October 20, 2026 21:34

This branch was successfully deployed

2 active deployments
public — dcc99039 Deployed Oct 20, 2026 by copy-pr-bot[bot] via release / finalize / notify #285
test — dcc99039 Deployed Oct 20, 2026 by copy-pr-bot[bot] via cicd-wait-in-queue #1096
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants