Skip to content

Worker: MSTAR_TP_ASYNC_SCHED on by default - #1075

Merged
NSagan271 merged 1 commit into
mainfrom
tp-async-default
Oct 31, 2026
Merged

NSagan271 merged 1 commit into
mainfrom
tp-async-default

Conversation

@NSagan271

Copy link
Copy Markdown
Collaborator

What does this PR do?

Turns async scheduling on by default for lockstep-parallel (TP / SP) nodes: MSTAR_TP_ASYNC_SCHED and the serving config's tp_async_sched now default to on. MSTAR_TP_ASYNC_SCHED=0 (or tp_async_sched: false) still runs those nodes serially, and a node list still enables it for just those nodes.

The default was 0 only because the path was new when #224 added it (2026-09-11). Since then the TP benchmark numbers quoted in PRs have been taken with it set by hand, so the default is what has gone unmeasured, and a default tp2 run doesn't exercise the path those numbers describe.

The code change is one line, the fallback in _tp_async_sched_setting (mstar/worker/worker.py). The rest updates the test that pins the default, plus the four places that documented 0: docs/environment_variables.rst, docs/serving.rst, AGENTS.md (invariant 7's note) and the async-worker skill.

Evidence

Qwen3.5-9B TP2 on 2 x H200, chunked prefill (#367's branch), two sessions per arm, interleaved, prefix cache off, MSTAR_SHM_ARENA=1, Rust graph runtime. The 200- and 3000-token prompts are mixed 4:1, with 256 tokens out. Cells are session 1, session 2.

Workload Metric MSTAR_TP_ASYNC_SCHED=0 =1
c48, 240 requests req/s 18.3, 18.5 23.3, 23.3
c48 TTFT p50, short (ms) 184, 182 88, 88
c48 ITL p99.9 (ms) 335, 334 58, 59
16 decodes + 16 prompts of 16k-30k tokens decode gaps over 1 s 16, 16 0, 0

Greedy outputs on 24 prompts of 3k-30k tokens are identical between the two arms in one of the two sessions. In the other, the 0 arm differs on one prompt from every other run, including its own second session. Neither arm had a hang or a failed request.

How was it tested?

  • ruff check .: clean.
  • python -m pytest test/modular test/distributed on CPU (OMP_NUM_THREADS=2), with and without the change: the same outcome per test, 218 failed, 8176 passed, 906 skipped, 18 errors on both. The failures come from the test machine's environment (torch 2.12 has no matching torchaudio build yet); none involve TP or the worker's scheduling.

Checklist

  • ruff check . passes
  • Added or updated tests / docs where relevant

Developed with AI assistance (Claude).

🤖 Generated with Claude Code

MSTAR_TP_ASYNC_SCHED and the serving config's tp_async_sched now default
to on. It was off only because the path was new when #224 added it; the TP
numbers quoted since have been taken with it set by hand. 0 / false still
runs the parallel nodes serially.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@vasilevklart vasilevklart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm, much needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants