Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
df1af58
Engine, conductor, API server and shared components for the overnight…
dghosef Oct 24, 2026
0193c2c
Merge origin/main into perf/split-1-shared
dghosef Oct 27, 2026
82b83b1
Conductor: count DP replica load per (node group, replica) (R1.4)
dghosef Oct 27, 2026
3d3722a
Piecewise runner: apply one_row_per_step in its own bucket lookup (R1.5)
dghosef Oct 27, 2026
c485d3d
TokenStop: read the generated-token count without creating request st…
dghosef Oct 27, 2026
18c5d21
TokenStepNode: declare token_stop in __init__ like every AR node (P3-2)
dghosef Oct 27, 2026
213cbd8
Ragged attention: hold the custom op's managers weakly (P3-1)
dghosef Oct 27, 2026
79aeb63
Docs: one_row_per_step, shard_heads and compile_op; warmup and switch…
dghosef Oct 27, 2026
58b71cc
Sampler: loopback_input_ids moves from ARNodeSubmodule onto SamplerRe…
dghosef Oct 27, 2026
5358123
Nits: router tie docstring, router test docstring, stray EOF blank li…
dghosef Oct 27, 2026
7dc25f6
Video decode: one thread policy from the preprocess pool and CPU affi…
dghosef Oct 27, 2026
5bd18a4
Whisper: declare token_stop in __init__ (P3-2)
dghosef Oct 27, 2026
bac7cda
Qwen3.5: decode loop-back goes through SamplerResource.loopback_input…
dghosef Oct 27, 2026
26c62af
Canary, Canary-Qwen, Whisper: TokenStop reads the class loop and samp…
dghosef Oct 27, 2026
6f2540e
Media limits: the video decode thread cap follows CPU affinity, not a…
dghosef Oct 27, 2026
e1ff4dc
Tests: the one-row piecewise runner captures batch size 1 only (R2.d)
dghosef Oct 27, 2026
04af3ba
Merge origin/main into the perf stack's shared changes (#858)
dghosef Oct 27, 2026
148a9c9
TokenStop: check_stop reads a row's first element, as check_stop_batc…
dghosef Oct 27, 2026
72ce104
Waypoint harness: serve_rollout's parsers strip the internal id's #<n…
dghosef Oct 27, 2026
377d21a
Warmup: repeat and concurrency share one positive-integer check
dghosef Oct 27, 2026
3ac732b
Warmup: one id form, warmup-<spec>.<level>.<copy>, and the first fail…
dghosef Oct 27, 2026
6d152f3
API server: api_switch_interval_s must be a positive number, checked …
dghosef Oct 27, 2026
49c828e
docs/serving.rst: the warmup copy count is the largest node group's r…
dghosef Oct 27, 2026
fe1b879
Ragged attention: the mstar::ragged_attention op body calls the manag…
dghosef Oct 27, 2026
41d22c2
Resources: every builder shards heads by EngineResourceInfo.head_shar…
dghosef Oct 27, 2026
c881c83
wav2vec2: the frame lengths go up through to_device_nonblocking
dghosef Oct 27, 2026
37ad4f5
MoE: the blocks take a fused router through router=, not a flag of th…
dghosef Oct 27, 2026
7c34610
Tests: the get_device compile check joins test_submodule_device_cache.py
dghosef Oct 27, 2026
d6656dd
Resources: EngineResourceInfo without head_shards shards over its joi…
dghosef Oct 27, 2026
a025ebd
Engine: TP ranks always split a resource's heads; nodes sharing it mu…
dghosef Oct 27, 2026
2391eb1
Tests: test_startup_warmup.py says it covers the API server's process…
dghosef Oct 27, 2026
b14f452
HostRows.first_values: one row map, no in-order fast path beside it
dghosef Oct 27, 2026
bb5fd76
TokenStop: one per-row verdict holds the walk test; no check_walk fla…
dghosef Oct 27, 2026
a6a1de8
Qwen3.5: the decode stop is a TokenStop declaration, not a copy of it…
dghosef Oct 27, 2026
0a79e0e
docs/serving.rst: api_switch_interval_s is re-measured once #849 lands
dghosef Oct 27, 2026
36260eb
Tests: the Qwen3.5 loop-cap test checks the real LLM submodule's stop
dghosef Oct 27, 2026
24a729f
Delete check_stop_batched's unread step_walk parameter (858 RB.1)
dghosef Oct 27, 2026
06fd646
Tests: two blank lines before the new ragged-attention tests (858 RB.2)
dghosef Oct 27, 2026
8f3de98
Tests: drop the last step_context the engine's stop check no longer r…
dghosef Oct 27, 2026
7e291e6
Warmup: count data-parallel replicas from the worker graphs (merceod …
dghosef Oct 28, 2026
636e2b8
Merge origin/main 73c6c17c4 into merge/858-main
dghosef Oct 28, 2026
d244382
858 I1.1: one WorkerGraph.replica_ranks for a worker graph's DP replicas
dghosef Oct 28, 2026
212cc49
858 I1.2: serving docs count warmup copies from the worker graphs
dghosef Oct 28, 2026
53a60d1
Warmup: a replicated entry runs one request alone first
dghosef Oct 28, 2026
088a61d
merceod #858 row 15: one pinned H2D helper, capability-gated and list…
dghosef Oct 28, 2026
c540ded
858 R3.1: warmup runs its solo once per entry, only when replicas are…
dghosef Oct 28, 2026
9a03b82
858 R3.2: the warmup solo logs its own outcome
dghosef Oct 28, 2026
32842c9
858 R3.3: to_device_nonblocking says an already-pinned source is read…
dghosef Oct 28, 2026
5058e89
Merge origin/main 94b038c26 into perf/split-1-shared
dghosef Oct 28, 2026
38c186d
M1: copy an already-pinned host tensor to the device in place
dghosef Oct 28, 2026
1c0569b
M2: size video decode threads from usable_cpus, apart from the torch …
dghosef Oct 28, 2026
8b4a2eb
M3: test GLM-5.2's stop id at prefill
dghosef Oct 28, 2026
591bad1
M4: declare a prefill-sampled first token on TokenStop
dghosef Oct 28, 2026
c84d883
M1: model the mocked host tensor in the pin test as pageable
dghosef Oct 28, 2026
b8a3075
N1: copy a pinned source in place only when it is contiguous
dghosef Oct 28, 2026
f22ef3f
N2: read usable_cpus once per process for video decode threads
dghosef Oct 28, 2026
8fe61cd
N3: say a generated_key counter must count the prefill token itself
dghosef Oct 28, 2026
731bd27
N4: the engine drops the closing token of a reply that ended at prefill
dghosef Oct 28, 2026
58bad2e
N4: say prefill_walks needs the loop to emit the token as buffer
dghosef Oct 28, 2026
d7ea416
Merge remote-tracking branch 'origin/main' into maint/858
dghosef Oct 29, 2026
0269eec
LingBot-World: call the ragged resource through resource.run, as the …
dghosef Oct 29, 2026
01d9f69
test_subgroup_creation_order: the stub worker graph carries replica_r…
dghosef Oct 29, 2026
71d722c
test_withheld_outputs: the fake check_stop_batched drops step_walk, a…
dghosef Oct 29, 2026
fd7211d
Merge origin/main into perf/split-1-shared
dghosef Oct 29, 2026
97dc8b7
TokenStop: leave the token budget to the loop cap
dghosef Oct 29, 2026
21a8d03
TokenStop: withhold a prefill-ended reply's closing token
dghosef Oct 29, 2026
68cd243
Warmup docs: the solo run happens only when replicas are uneven
dghosef Oct 29, 2026
bc84a25
video_decode_threads: the cap of 8 is per decode
dghosef Oct 29, 2026
d913754
Ragged attention: name each manager uniquely in the op registry
dghosef Oct 29, 2026
844266e
Warmup: a replica count that fails leaves warmup at one copy
dghosef Oct 29, 2026
92ff0c9
one_row_per_step docs: what declare_step receives
dghosef Oct 29, 2026
1d6f481
Docs: MSTAR_PY_SWITCH_INTERVAL_SEC gets its worker-scheduling row
dghosef Oct 29, 2026
6f74e95
Comments: the decode budget is the loop cap, not check_stop
dghosef Oct 29, 2026
f3de748
Docs: a prefill_walks token counts toward the budget, so the loop cap…
dghosef Oct 29, 2026
5286136
Merge origin/main into perf/split-1-shared
dghosef Oct 30, 2026
6e67694
Docs: say which MSTAR_PY_SWITCH_INTERVAL_SEC values the worker ignores
dghosef Oct 30, 2026
bcd00f6
Docs: point api_switch_interval_s to the workers' switch-interval var…
dghosef Oct 30, 2026
ad5f644
Merge origin/main into perf/split-1-shared
dghosef Oct 30, 2026
ed31270
Ragged attention: update a test docstring for unique op keys
dghosef Oct 30, 2026
da5ef36
Merge origin/main into perf/split-1-shared
dghosef Oct 30, 2026
509189b
Comments and docs: a shard_over_sp=False ragged resource splits its h…
dghosef Oct 30, 2026
5514453
Head sharding: one per-resource switch, shard_over_sp; NodeSubmodule.…
dghosef Oct 30, 2026
d28d18d
Merge origin/main into perf/split-1-shared
dghosef Oct 30, 2026
a908f31
Merge origin/main into perf/split-1-shared
dghosef Oct 30, 2026
50401ad
Name the TP x SP head-sharding test for the kinds it covers; reflow a…
dghosef Oct 30, 2026
78c53ac
Merge origin/main into perf/split-1-shared
dghosef Oct 30, 2026
02c4517
Say the api_switch_interval_s numbers predate #849's output-path rewrite
dghosef Oct 30, 2026
82d9fb5
Drop the head-sharding paragraph from the submodule attributes section
dghosef Oct 30, 2026
ac2cd28
Drop the TP x SP head-sharding test that main's sizing already passes
dghosef Oct 30, 2026
bb15c48
Drop the shard_over_sp sizing test, which main's sizing already passes
dghosef Oct 30, 2026
0cc8902
Merge origin/main into perf/split-1-shared
dghosef Oct 30, 2026
bbe03b6
Conductor: build its instance table from WorkerGraph.replica_ranks
dghosef Oct 30, 2026
0e495ae
Merge origin/main (bb0e0a8d7: #962, #941, #944) into perf/split-1-shared
dghosef Oct 30, 2026
7ee5eb4
Merge origin/main (c96e02b7d: #968, #856, #778, #876) into perf/split…
dghosef Oct 30, 2026
15f8249
Merge origin/main (9f84f18cd: #965) into perf/split-1-shared
dghosef Oct 31, 2026
42bb972
Merge main (c829a71cc) into perf/split-1-shared
dghosef Oct 31, 2026
bff76e2
Merge main (ad0a21eca) into perf/split-1-shared
dghosef Nov 1, 2026
7de9cc6
Pin video decode threads to the CPUs the plan leaves under pinning
dghosef Nov 1, 2026
bffb067
API server: drop the api_switch_interval_s knob
dghosef Nov 1, 2026
641e06c
Tests: the TP2 publish test's KV managers hold one rank's head
dghosef Nov 1, 2026
a25694a
API server: drop warmup_requests' concurrency option
dghosef Nov 1, 2026
34fbf94
Merge remote-tracking branch 'origin/main' into land/858
dghosef Nov 1, 2026
03f7758
Merge origin/main (165b403b7: #794, #950) into perf/split-1-shared
dghosef Nov 1, 2026
a4b5fca
Tests: Canary's decode cap leaves the prefill's token in the budget
dghosef Nov 1, 2026
f991121
Docs: last_prefill_flag for a prompt prefilled over several passes; G…
dghosef Nov 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude/skills/diffusion-scaffold/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ A recipe such as LTX-2.5's two-stage distilled one (half-resolution denoise →
Every attention in the DiT should go through a ragged resource, so the model gets the engine's kernels and its backend can change in config.

- `attention_segments(bucket_key)` declares every span a request's layers attend over, as `(label, length)`; the default is one `"main"` span of all its tokens. A layer that attends over a sub-span (a refiner over the image tokens alone, a joint model's per-modality self-attention) gets its own label, and `ragged_for(label)` gives that layer its callable.
- `ragged_for` memoizes one callable per label for the life of a binding. The compiled transformer guards on the identity of the callables it is handed; a fresh one per step recompiles every step.
- `ragged_for` memoizes one callable per label (the resource's `run` with the label bound) for the life of a binding, and a rebinding drops them so none attends through the old resource.
- A model with more than one head geometry (LTX-2.5's video 32×128 and audio 32×64 heads) declares one resource per geometry.
- Cross-attention between spans of the same request (video queries over text keys) is a separate cross-attention resource kind (`RaggedCrossAttentionSpec`, added in #372) whose step names `(q_label, kv_label)` pairs; see "Cross-attention between spans" in `docs/adding_models.rst`. Don't fall back to SDPA for it because the shapes are fixed inside a bucket.
- `joint_attention` in `attention.py` packs per-row q/k/v into the ragged layout (or runs SDPA when no resource is bound, which is what a parity backend uses).
Expand All @@ -50,7 +50,7 @@ Every attention in the DiT should go through a ragged resource, so the model get

- The engine's blanket compile is off for the node (`disable_torch_compile = True`); the model compiles its transformer region with `compile_utils.compile_transformer_forward`, which keeps the exact-op exclusions that preserve eager rounding. Compiling the DiT mostly buys the memory-bound elementwise work (modulation, fp32 norms, RoPE, gating), which on LTX-2.5 was ~45% of an eager step.
- `capture_buckets` lists `(graph_walk, bucket_key)` pairs to capture; `capture_request_inputs` supplies one placeholder row per bucket. A bucket is captured per batch size in `capture_batch_sizes`, and each one costs startup, so capture the shapes you serve, not every shape you accept. `replay_walks` lets another walk reuse a captured bucket.
- The captured graph removes the gaps the per-layer attention graph breaks leave in a compiled-but-eager step; measure both before deciding a model doesn't need capture.
- The captured graph removes the launch gaps of a compiled-but-eager step. Ragged attention breaks that compiled graph per layer unless the resource sets `compile_op=True` (then `run` traces as the `mstar::ragged_attention` custom op), so measure both before deciding a model needs capture.

## The overshoot veto

Expand Down
4 changes: 3 additions & 1 deletion benchmark/waypoint/benchmark_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,9 @@ def _dit_step_timestamps(log_text: str, request_ids: set[str]) -> list[float]:
batch = ast.literal_eval(line.split(marker, 1)[1].strip())
except (SyntaxError, ValueError):
continue
if not isinstance(batch, (list, tuple)) or not any(rid in request_ids for rid in batch):
if not isinstance(batch, (list, tuple)) or not any(
str(rid).split("#", 1)[0] in request_ids for rid in batch
):
continue
match = _LOG_TIMESTAMP_RE.match(line)

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.

This fixes _dit_step_timestamps, but rollout._dit_schedule (called right before it in _concurrent_server_metrics) still matches ids by exact membership, so rows_per_step_histogram comes out empty while step_spacing_ms is real. #860 fixes the serve_rollout parsers; that hunk belongs next to this one.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done - 72ce1045e

if match is None:
Expand Down
76 changes: 51 additions & 25 deletions docs/adding_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -682,17 +682,21 @@ The spec types are:
``head_dim`` (all pre-sharding, as in ``KVConfig``), an ``sm_scale`` that
defaults to ``head_dim ** -0.5``, ``backend`` (``RaggedAttnBackend.AUTO``, the
default, ``RaggedAttnBackend.FLASHINFER``, or ``RaggedAttnBackend.DENSE``),
``flashinfer_backend``, and the
``flashinfer_backend``, the
two CUDA-graph ceilings ``max_segments_per_request`` and
``max_tokens_per_request``. ``DENSE`` runs FA3 ``flash_attn_varlen`` (AITER on ROCm)
and falls back to FlashInfer if that kernel is missing. By default the heads are split
across all TP × SP ranks of the node; ``shard_over_sp=False`` splits them across the
TP ranks only, for an attention each sequence-parallel rank runs whole over its own
tokens (one over a replicated stream, or a cross-attention from the rank's query
shard). ``workspace_mb`` sizes each label's FlashInfer workspace per slot (default
``MSTAR_WORKSPACE_BUFFER_MB``, 512); a node with many labels can declare less, since a
ragged prefill only uses it for split-KV partials. See `Cacheless attention (encoder
towers)`_.
``max_tokens_per_request``, ``compile_op``, ``shard_over_sp`` and
``workspace_mb``. ``DENSE`` runs FA3
``flash_attn_varlen`` (AITER on ROCm) and falls back to FlashInfer if that kernel is
missing. By default the heads are split across all TP × SP ranks of the node;
``shard_over_sp=False`` splits them across the TP ranks only, for an attention
each sequence-parallel rank runs whole over its own tokens (one over a
replicated stream, or a cross-attention from the rank's query shard).
``workspace_mb`` sizes each label's FlashInfer workspace per slot (default
``MSTAR_WORKSPACE_BUFFER_MB``, 512); a node with many labels can declare less,
since a ragged prefill only uses it for split-KV partials. ``compile_op``,
``shard_over_sp`` and ``workspace_mb`` are the model's declaration; the serving
config's ``resources:`` overrides take only the backends and the two ceilings.
See `Cacheless attention (encoder towers)`_ for ``compile_op``.
* - ``RaggedCrossAttentionSpec(config=RaggedAttentionConfig(...))``
- The cross-attention counterpart: one span of each request attends another
(``RaggedCrossAttentionStep(pairs=...)``). Same config. See `Cross-attention
Expand Down Expand Up @@ -939,7 +943,11 @@ encoder node only, and names no cache:

A layer binds the key as it binds any other resource, then attends through the resource's
``run(q, k, v, label=None)``. There is no KV write to pair it with, so no
``AttentionCallable`` is involved.
``AttentionCallable`` is involved. A compiled caller breaks at ``run``; with
``RaggedAttentionConfig(compile_op=True)``, ``run`` traces as the ``mstar::ragged_attention``
custom op instead, so the region keeps one graph across the attention (worth it for a
compiled, uncaptured region; it costs startup time and capture memory where the region
is also captured). An eager call goes straight to the kernel.

The step is an ordinary ``AttentionStep``, and its ``segments`` are the entire layout.
There is no cache to read the layout off, so a label that carries no segment in the
Expand Down Expand Up @@ -967,14 +975,15 @@ step names the ``(q_label, kv_label)`` pairs:

Each pair is planned as its own layout, pairing each request's ``q_label`` span with that
request's ``kv_label`` span; cross-attention is never causal. A layer attends through
``RaggedAttentionCallable(resource, cross_label(q_label, kv_label))``, passing the key
``resource.run(q, k, v, label=cross_label(q_label, kv_label))``, passing the key
span's tokens as ``k`` and ``v``. One resource has one head geometry, so a model whose
attentions differ in head count or head dim declares one spec per (kind, geometry).
LTX-2.5 is the reference (``mstar/model/ltx2_5/submodules.py``).

Called with ``return_lse=True``, a ragged or ragged cross-attention callable on the FlashInfer
backend also returns each query row's log-sum-exp (``[total_tokens, H]``, fp32, natural log)
from the same plan, which is what merging attentions over disjoint key sets needs. Under sequence parallelism
Called with ``return_lse=True``, a ragged or ragged cross-attention resource's ``run`` on the
FlashInfer backend also returns each query row's log-sum-exp (``[total_tokens, H]``, fp32,
natural log) from the same plan, which is what merging attentions over disjoint key sets
needs; a compiled caller breaks there even with ``compile_op``. Under sequence parallelism
LTX-2.5's audio queries attend each rank's share of the video tokens, and
``attention_over_sharded_keys`` (``mstar/model/components/distributed/sequence_parallel.py``)
merges them.
Expand Down Expand Up @@ -1173,15 +1182,22 @@ methods are:
``check_stop(...) -> set[str] | StopCheck`` (optional)
Runs off the GPU thread, and may read tensor values. Return the names of the ``Loop``
objects to stop, for example after seeing the EOS token. This is how a decode loop
terminates. A prefill samples the first token before its decode loop exists, so a stop
there is returned as ``END_PARTITION`` (from ``mstar.model.submodule_base``) instead:
the worker reports the partition done with that pass, and the conductor ends it rather
than start decode. Return it only from a row outside any loop; from inside one the
request fails. ``TokenStepNode`` does this for its ``PREFILL_WALK``. It suits a partition
with nothing left to run once generation stops: a model that runs another walk after its
loop (an ``align`` walk, or image generation after thinking) or publishes final-only
state at the loop's stop needs its own transition instead. Keep ``check_stop_batched``,
if you write one, in agreement.
terminates. An AR submodule whose loop ends on a stop token sets
``self.token_stop = TokenStop(...)`` in ``__init__`` instead of writing one; that also
gives it ``check_stop_batched``, which checks a whole step off one host copy of its
tokens. The token budget is the loop's cap from ``get_loop_caps``, not a stop check.
A prefill samples the first token before its decode loop exists, so a stop there is
returned as ``END_PARTITION`` (from ``mstar.model.submodule_base``) instead: the worker
reports the partition done with that pass, and the conductor ends it rather than start
decode. Return it only from a row outside any loop; from inside one the request fails.
``TokenStop`` does this for the walks in its ``prefill_walks``, whose token counts toward
the budget, so ``get_loop_caps`` gives the loop ``max(1, max_output_tokens - 1)``. A
model that prefills a prompt over several passes sets ``last_prefill_flag`` to the
``step_metadata`` flag of its last pass (Qwen3.5: ``"last_prefill"``), or a stop id
sampled on its first pass ends the request. It suits a partition with nothing left to run once generation stops: a model that runs
another walk after its loop (an ``align`` walk, or image generation after thinking) or
publishes final-only state at the loop's stop needs its own transition instead. Keep
``check_stop_batched``, if you write one, in agreement.
To also keep some of this step's outputs from being routed, return
``StopCheck(stops, withheld=(names...))``, for example a frame streamed alongside the
EOS token: its consumer then never receives it, instead of finding and dropping it with
Expand Down Expand Up @@ -1732,6 +1748,14 @@ Both types share the base ``PiecewiseCudaGraphConfig`` fields:
when the region was leased, for example when the outer step is ``None``, and not
whenever ``runner.can_run`` is true: a refused batch can still fit a bucket, and
replaying it would declare the region's resources twice.
- ``one_row_per_step`` makes the runner lease, check (``can_run``) and replay the region as
one row, whatever the step's batch size, under the step's first request. It is for a
packed region that runs every request's segments as one ragged batch, such as a vision
tower, and needs ``lease_before_step`` and ``capture_batch_sizes=[1]``. The region's
``declare_step`` then receives ``[first_rid]`` with every request's ``seq_lens``, so the
whole step's segments count against that one request's ``max_segments_per_request``,
which for this region is a per-step ceiling. Pair it with a ``can_lease`` that refuses a
step with more.
- ``capture_batch_sizes`` lists the batch sizes to record. ``None`` uses the runner
default.
- ``compile`` runs ``torch.compile`` on ``capture_fn`` before capture. The default is
Expand Down Expand Up @@ -1966,7 +1990,9 @@ default:
preprocess_torch_threads: 4

The setting applies only to the API server process. The conductor and workers keep
torch's default.
torch's default. It does not size video decoding: each torchcodec decode that asks
``media_limits.video_decode_threads`` (``Model.load_video`` does) runs FFmpeg with up to 8
threads, no more than the CPUs the process's CPU plan leaves unpinned (``CpuPlan.left``).

A pool that small is slow for a large copy, and a 121-frame 832x480 video is 145 MB. A
video decoder should therefore emit its clip in the layout the encoder takes, transposed
Expand Down
3 changes: 2 additions & 1 deletion docs/environment_variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,8 @@ Worker scheduling
last core of the mask. A number outside the mask, or too near its top
for every worker, stops the server at startup. Threads and pools a
pinned thread starts keep the process mask (``mstar.utils.threads``),
and the API server's intra-op and encode pools are sized from the
and the API server's intra-op and encode pools and FFmpeg's per-decode
threads (``media_limits.video_decode_threads``) are sized from the
CPUs the pins leave (``CpuPlan`` in ``mstar.utils.cpus``). Each worker
and the API server log their CPUs and why. Read by
``knobs.step_thread_core``; no effect where ``os.sched_setaffinity``
Expand Down
8 changes: 7 additions & 1 deletion docs/serving.rst
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,13 @@ A config maps the model's computation-graph nodes to physical GPU ranks. The key
``hf://<owner>/<repo>/<path>`` (a file in a model's HF repo); its modality
comes from the extension, or give ``{path: ..., modality: ...}``.
``repeat: N`` sends ``text`` N times over, a long prompt for a path only
long prompts take (a long-context prefill). A malformed or failing warmup
long prompts take (a long-context prefill). Each entry is sent as many
times at once as the most data-parallel replicas any of the model's worker
graphs is served by (the replicas the conductor picks from; a node group no
walk places adds none), so every replica warms. When some worker graph has
fewer replicas than that, such as one DiT instance beside a replicated VAE,
the entry first runs once alone, so that graph also warms its one-request
shape before the copies reach it together. A malformed or failing warmup
is logged and skipped.
* - ``dist_timeout_s``
- *(optional)* Timeout in seconds for the NCCL world group and its parallel
Expand Down
Loading
Loading