Skip to content

gates, placement: --parallel auto counts the slots in one shared fit on every seat of resident slots - #1123

Merged
juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-q38-cmn-auto-slots
Nov 2, 2026
Merged

juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-q38-cmn-auto-slots

Conversation

@juliankang4

@juliankang4 juliankang4 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

--parallel auto를 Qwen3.8 전용 코드에서 공용 owner로 옮겨 슬롯을 가진 모든 seat가 쓰게 했고, 슬롯이 하나뿐인 seat는 이름을 대며 거절합니다.

What and why

--parallel auto picked the slot count from memory on the Qwen3.8 seat only. Every other seat refused it, so the count, its bisection bound and its refusal rules lived in qwen38.rs (auto38). This PR moves them into one owner, bind::AutoSlots::count, which a seat calls with two closures: its one-slot ask and its plan of n slots. DeepSeek V4.1, GLM-5.3-Flash, the Qwen3 seat (Qwen3, Qwen3.5/3.6, dense Qwen3.8) and the tiered seats (MiMo-V2.6, MiniMax-M3.1, Flint) now take --parallel auto; Solar-Open2, Nemotron, Raon-1 and Muse Spark hold one sequence and refuse it by name, as they refuse --parallel 2. A new seat of resident slots writes its two closures and no count logic.

  1. One count. AutoSlots::count returns the largest n (up to 8) whose plan holds one request's context at --slot-ctx, or at the one-slot default. A default fitted under the model limit, a one-slot ask short at its floor, or a drafted default that holds no context serves one slot. A --slot-ctx one slot cannot hold is refused by name. The total is checked against usize.
  2. One-sequence loads. A load chosen at one slot that serves one sequence (route trace, DSpark, the Qwen3 in-file MTP draft, an expert tier card on MiMo-V2.6) prints parallel auto slots=1: <why> and serves one slot instead of refusing.
  3. Qwen3 seat. The count holds where the load a fixed --parallel N makes holds, whole or placed, and the served draft must run on that load (BLOOMERY_DRAFT=lookup needs a whole-card load, so the count stops before a placed one).
  4. Tiered seats. The count and the final plan pick the load through one function, streamed, so the count includes the host staging a default stream makes (the ring, or the plan without it) and --parallel auto equals the fixed count that start would plan. A set stream needs its ring, and residency off needs no staging. The residency lever record is printed once, for the selected load, not for each count candidate.
  5. Seat probes. The GLM and V4.1 plans of n slots are split out of serve_ctx and ctx_choice and reached through ctx_ask::probe_of. ctx_ask::most_slots takes a bool closure; its bisection is unchanged.

Docs: docs/serving.md (seat table, "Concurrent requests"), README.md and each seat's usage string ([--parallel N|auto]).

Release notes: Changed: --parallel auto counts the slots on every seat that serves several slots, not only Qwen3.8; seats of one sequence refuse it by name.

Code shape

  • No second copy. The count, its bisection bound, the fitted/floor/draft/--slot-ctx rules, the short-refusal reading and the total live in bind::AutoSlots::count; every seat hands in its own closures. The GLM and V4.1 probes share ctx_ask::probe_of, the tiered count and plan share streamed, and the Qwen3 draft rule is one function, serves_on, which the startup guard and the count both call.
  • Model code holds only architecture facts. Each seat holds its one-slot ask and its plan of n slots. bind gained no per-model branch.
  • Dead code is gone. Qwen3.8's private probe mapping (HostShort, q38place::probe), the auto-only check_mtp_ctx and its a.ctx copy, and the by-name refusals of --parallel auto are removed.
  • No silent failure. A --slot-ctx no slot holds, a one-sequence seat asked for auto, and a count the load cannot place are named errors.
  • Comments state what is true now.
  • No relaxed gate. No band, tolerance or lint moved.
  • cargo fmt and cargo clippy are clean on what I touched; the lint count did not go up.

Duplication found or removed (path:line), or "none": Qwen3.8's own count and refusal mapping in crates/gpu-gates/src/bin/shared/serve_seats/qwen38.rs (removed in favour of AutoSlots::count); the GLM and V4.1 probe bodies in glm5next_place.rs and ds41_place.rs (now ctx_ask::probe_of).

What I ran

Upstream base d76d5fbe38459a295aa4093aac5a094258ee7388, PR head f06b7b655ed0111196093a61d4a4200e58a688d8. The commands in the two card sections ran on a DGX Spark (GB10) or an RTX 5090 machine. $S is ./target/release/bloomery-serve, built with F=glm5next,clef,vision,mimo2,solar2,minimaxm3,flint,gemma-embedding2,hf,checkpoint and cargo oxide build --arch "$(bash tools/arch.sh)" -- -p bloomery-gpu-gates --features "$F" --release --bin bloomery-serve. --plan loads nothing; it prints the lines a start would use. "Fixed count" below means the same command with --parallel N at the same --slot-ctx (it plans) and --parallel N+1 (it is refused with no-fit, rc 80), unless N is 8, the most.

DGX Spark (GB10, sm_121a)

$ nvidia-smi
Sun Nov  1 22:42:26 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 595.84                 Driver Version: 595.84         CUDA Version: 13.3     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GB10                    On  |   0000000F:01:00.0 Off |                  N/A |
| N/A   53C    P8              5W /  N/A  | Not Supported          |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+

Model: nvidia/Qwen3.8-Flash-Next-FP4-Local, revision b9ce18a6887e18c089fdea8509a33e63429a3300 (checksums below).

Unit tests and FAIL-first:

cargo test -p bloomery-placement --lib ctx_ask
bash tools/gate.sh --gpu --oxide -p bloomery-gpu-gates --features "$F" --release --lib -- bind::
bash tools/gate.sh --gpu --oxide -p bloomery-gpu-gates --features "$F" --release --bin bloomery-serve
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 216 filtered out
test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 283 filtered out
test result: ok. 40 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

With the count's total left at one slot's context (s.checked_mul(n) changed to s.checked_mul(1)), and with --parallel auto refused at the parse as before, each test stops with a panic:

bash tools/gate.sh --gpu --oxide -p bloomery-gpu-gates --features "$F" --release --lib -- auto_counts_the_seats_slots_from_the_one_slot_ask
test bind::tests::auto_counts_the_seats_slots_from_the_one_slot_ask ... FAILED
thread 'bind::tests::auto_counts_the_seats_slots_from_the_one_slot_ask' (4906) panicked at crates/gpu-gates/src/bind.rs:4437:9:
bash tools/gate.sh --gpu --oxide -p bloomery-gpu-gates --features "$F" --release --bin bloomery-serve -- a_start_checks_its_arguments_before_the_fetch
test drive::tests::a_start_checks_its_arguments_before_the_fetch ... FAILED
thread 'drive::tests::a_start_checks_its_arguments_before_the_fetch' (5331) panicked at crates/gpu-gates/src/bin/bloomery_serve.rs:1807:66:

Gate and real binary:

BLOOMERY_TIER=fixture just gate-gpu-qwen38-serve
$S -m "$FP4L" --plan --parallel auto
BLOOMERY_DRAFT=off $S -m "$FP4L" --plan --parallel auto --slot-ctx 131072
BLOOMERY_DRAFT=off $S -m "$FP4L" --plan --parallel 5 --slot-ctx 131072
BLOOMERY_DRAFT=off $S -m "$FP4L" --plan --parallel 6 --slot-ctx 131072
$S -m "$FP4L" --host 127.0.0.1 --port 18751 --parallel auto --slot-ctx 16384
# two concurrent POST /completion requests, then GET /props
gate-gpu-qwen38-serve: PASS
parallel rule=slots slots=3 slot_ctx=262144 total=786432 from=auto pass=one
parallel rule=slots slots=5 slot_ctx=131072 total=655360 from=auto pass=one   (--parallel 5 holds, --parallel 6: exit 80 no-fit)
parallel rule=slots slots=8 slot_ctx=16384 total=131072 from=auto pass=one
resp 0 slot 0 predicted_n 64 ' Paris. The capital of Germany is Berlin. The capital of Italy is Rome. The capi'
resp 1 slot 1 predicted_n 64 '\n\n<think>\nThe user wants me to write the numbers 1 through 10 in their word form'
slots used [0, 1]
props total_slots 8 parallel line slots 8

The first --plan line has the MTP draft on (3 slots); with BLOOMERY_DRAFT=off it is slots=4 total=1048576. At --slot-ctx 16384 auto is 8 with the draft on or off, and --parallel 8 holds with it off. The served start answered two concurrent /completion requests on slots 0 and 1, and /props reports the same 8 slots as the parallel line.

RTX 5090 machine (sm_120a)

$ nvidia-smi
Mon Nov  2 10:30:06 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 595.99.02              Driver Version: 595.99.02      CUDA Version: 13.2     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 5090        Off |   00000000:01:00.0 Off |                  N/A |
|  0%   43C    P8             12W /  400W |       2MiB /  32607MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+

Models:

File SHA-256
Qwen3.6-35B-A3B-Q4_K_M.gguf 4ac6a06bce551257267f49ad2226f8671a22519ccc1a4dde9d5b433d1f2a410d
Qwen3-30B-A3B-Instruct-2507-Q4_K_M.gguf 6c997b8af17debdfb01d890214400ccbab00db6acc0ba8da5de1cc906c4774d0
Qwen3.8-27B-Q4_K_M.gguf
Qwen3.6-35B-A3B-UD-Q4_K_M.gguf

The Qwen3 seat gate on $Q3 (Qwen3-30B-A3B), $Q36 (Qwen3.6-35B-A3B) and $Q38D (Qwen3.8-27B), then --plan on the seat's files, each --parallel auto count against the fixed count (the table rows come from the same --plan command at each --slot-ctx):

BLOOMERY_GATE_CARD=any bash tools/gpu-gate.sh gate_qwen3_serve --model "$Q3" --model "$Q36" --model "$Q38D" --dir "$D"
$S -m "$Q36" --plan --parallel auto --slot-ctx 65536
$S -m "$Q36" --plan --parallel 8 --slot-ctx 65536
checks PASS 198 FAIL 0
gpu-gate.sh: gate_qwen3_serve ran 287 s (exit 0)
File Context (--slot-ctx) Result (--parallel auto) Reference (fixed count)
Qwen3.6 Q4_K_M unset slots=5 slot_ctx=262144
Qwen3.6 Q4_K_M 16384 8 --parallel 8 holds
Qwen3.6 Q4_K_M 65536 8 --parallel 8 holds
Qwen3-30B-A3B Q4_K_M unset slots=1 slot_ctx=262144
Qwen3-30B-A3B Q4_K_M 16384 8 --parallel 8 holds
Qwen3-30B-A3B Q4_K_M 65536 4 --parallel 4 holds, --parallel 5 refused (rc 80)
Qwen3.8-27B Q4_K_M unset parallel auto slots=1: the default context is fitted below the model limit (ctx=225280)
Qwen3.8-27B Q4_K_M 16384 8 --parallel 8 holds
Qwen3.8-27B Q4_K_M 65536 3 --parallel 3 holds, --parallel 4 refused (rc 80)
Qwen3.6 UD-Q4_K_M (in-file MTP) unset parallel auto slots=1: the in-file MTP draft serves one sequence
Qwen3.6 UD-Q4_K_M, BLOOMERY_DRAFT=off 16384 8 --parallel 8 holds

Served start, Qwen3.6 Q4_K_M --parallel auto --slot-ctx 16384:

parallel rule=slots slots=8 slot_ctx=16384 total=131072 from=auto pass=one
load arch=qwen35moe resident_bytes=25915183228 cache=f16 ctx=16384 slots=8 slot_ctx=16384 layers=40 ubatch=4096 graph_nodes=520 in 2.3 s
resp 0 slot 0 predicted_n 64 ' Paris.\nThe capital of France is Paris.\nThe capital of France is Paris.\nThe capi'
slots used [0, 1]
props total_slots 8 parallel line slots 8

The Qwen3.6 lookup draft (BLOOMERY_DRAFT=lookup, which needs a whole-card load):

bash tools/gate.sh --gpu --oxide -p bloomery-gpu-gates --features "$F" --release --lib -- bind::
bash tools/gate.sh --gpu --oxide -p bloomery-gpu-gates --features "$F" --release --bin bloomery-serve
BLOOMERY_DRAFT=lookup $S -m "$Q36" --plan --parallel auto --slot-ctx 65536
BLOOMERY_DRAFT=lookup $S -m "$Q36" --plan --parallel 5 --slot-ctx 65536
BLOOMERY_DRAFT=lookup $S -m "$Q36" --plan --parallel 6 --slot-ctx 65536
test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 285 filtered out
test result: ok. 40 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
parallel rule=slots slots=5 slot_ctx=65536 total=327680 from=auto pass=turns
parallel rule=slots slots=5 slot_ctx=65536 total=327680 from=flag pass=turns
{"schema":"bloomery.event/1","event":"error","exit":1,"code":"refused","message":"BLOOMERY_DRAFT=lookup needs the whole-card load: --place unset on a resolved to a placed load, ...

With the draft rule removed from the count (serves_on(Draft::Off, placed)), the same auto command picks 8 slots and exits 1 with the same refusal; the rule restored, auto equals the fixed count (5).

GLM-5.3-Flash and DeepSeek V4.1 fixture plans (--plan at each fixture's card budget, BLOOMERY_DRAFT=off for GLM at --slot-ctx 4096): GLM auto is slots=8 slot_ctx=16384 by default and 8 at 4096 (--parallel 8 holds); V4.1 auto is slots=1 slot_ctx=1048576 by default and 8 at 4096 (--parallel 8 holds).

Tiered seats (host staging in the count)

cargo fmt --all -- --check
cargo test --lib
cargo clippy --target x86_64-unknown-linux-gnu -p bloomery-gpu-gates --bin bloomery-serve --features glm5next,clef,mimo2,solar2,minimaxm3,flint,gemma-embedding2,hf --tests

cargo test --lib runs in a small crate built from the selection functions in tiered.rs and the new tests auto_slots_hold_default_stream_staging and auto_slots_report_only_the_selected_residency, because the server binary does not link on this machine. cargo fmt printed nothing (rc 0) and cargo clippy finished (rc 0).

test tests::a_refused_plan_without_the_ring_is_the_seats_refusal ... ok
test tests::a_plain_plan_that_streams_nothing_loads_past_refused_staging ... ok
test tests::auto_slots_hold_default_stream_staging ... ok
test tiered::tests::auto_slots_report_only_the_selected_residency ... ok
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

With the staging check made conditional on a set stream again, the new test stops:

test tests::auto_slots_hold_default_stream_staging ... FAILED
assertion `left == right` failed: the count follows the selected load: set=false off=false staging=true
  left: (8, Some(8192))
 right: (6, Some(6144))

With the residency report moved back into the resolver the count calls for each candidate, the second new test stops:

test tiered::tests::auto_slots_report_only_the_selected_residency ... FAILED
assertion `left == right` failed: only the selected load is reported: residency lever residency=mid-p0-s1 why=place
  left: 7
 right: 1
SHA-256 of the FP4-Local files
b0ad2a8a314ca96618e21e40d50c0af6e181e6060f9cdd1996c7074d19284c1a  README.md
c3cf9e34abf4f9e36c2d72165aa9c132d3e2a725b6c2586aaa3a8af9d7a81041  chat_template.jinja
b50dbc52a0c83b0cd2a44a372c1fb6b5e0e6827d22f2611c97d4d030f92f6b28  config.json
e70c136c1b78ddc1fb0905bac8e733a4dc448d4f852a5dd75143fffc70be550e  generation_config.json
a9d356d7bdf1ef4949e3e748e95b8e10ad9d4e2e838eddc38a0a7b6b94d1db8d  merges.txt
5fa166bbb1cf25adda455117563efa72a2072272001f459eedece131ffc913e1  model.safetensors.index.json
27225450ac9c6529872ee1924fcb0962ff5634834f817040f444118116f4e516  preprocessor_config.json
ebf3648c5f4cd1f24e79789e7803498dc4e74cb52515cc515b2d22cf8161953b  tensors/model-00001-of-00021.safetensors
79a643fc5c024089cecd32ca27dc43e671cbec70ff3628b728909b7656ac43ec  tensors/model-00002-of-00021.safetensors
c45f942203db4c7f5a1071700b93b908495cc790271acddfff39091c2b953923  tensors/model-00003-of-00021.safetensors
071ab9cf963ca0f1a6a194b4cec485f5de18ef9804da915b2e6abd0eb0c707af  tensors/model-00004-of-00021.safetensors
f80d17870eb1d36917257494770984953476583c57737f61fdbd341c957b9715  tensors/model-00005-of-00021.safetensors
3e9183d4ebb267fa92429184d5132d302cb1a98fd049149e5d01dccd4ca65795  tensors/model-00006-of-00021.safetensors
aa1ad959c4d62e0bc4600fd0b57cc2939b463e9fb53dc01020e188552b52ce5a  tensors/model-00007-of-00021.safetensors
0b18844027be74b84b240f23bf3a744bc29b35de0bd384f41c40cd85e6339326  tensors/model-00008-of-00021.safetensors
2d0b6c66790c17f8b1fdcf442f541778c8f0a381aca26c11b9d7cfcf7c96f2f0  tensors/model-00009-of-00021.safetensors
3ed9bd73745aebf6dc136f437b67d6b9fc3d38d25ad84300b399164bc87a72b7  tensors/model-00010-of-00021.safetensors
4936ff28c6cc8b66653ddb9cae28bc284569a1a2f7116819a017dc1a0e517ed8  tensors/model-00011-of-00021.safetensors
dd7df5a6ff73e9960412243f744eab9ec35f4be40da5bb158dc4ba8796b33742  tensors/model-00012-of-00021.safetensors
28a455c8ea4ebaa847fb4cbed2bc1de9eff0b501dd3f848a3a3cfc38778e8500  tensors/model-00013-of-00021.safetensors
6941676e685abf9817d9c48a17fdeda20b2b72d16217555252aa4c602b7f98b8  tensors/model-00014-of-00021.safetensors
2a1129b5acfc24a45bf402aa63dcef08b531aedfdaf5233c65fd3d12dc303fdd  tensors/model-00015-of-00021.safetensors
635e97fbad78fa988647d407e2b58e55d551ef94d798c9b6fb5550de25e86429  tensors/model-00016-of-00021.safetensors
bf60d564d89a805b67f8be5f2847a1b1567a70dbc23d19754395c127568474ad  tensors/model-00017-of-00021.safetensors
c5bde22f9364e82eb25973456795592fdcb4b158bc2095898979a2566bf4c562  tensors/model-00018-of-00021.safetensors
da3dc3b4f428f5b9dd53362691043d0242f48d03adca9b7b553bd9f3a1e96350  tensors/model-00019-of-00021.safetensors
4978bb6b8480cfc02d3c8bc84ba86202889f5f10d090bb17c21fee663cea7683  tensors/model-00020-of-00021.safetensors
48203838f2c76921bddbf1cc51d20a23858c128821a21add55fa1778e5e25283  tensors/model-00021-of-00021.safetensors
0997f410c57a1f4e53b09e4be8f4a172d90edd9564368fb0847030937229b9f3  tokenizer.json
b11349aafa7cdc6a320767cf7ceb29ed82f7eda5d65e8e0819e76f0ce947bf27  tokenizer_config.json
7768af27c1fafa9cc9011c1dc20067e03f8915e03b63504550e11d5066986d13  video_preprocessor_config.json
ce99b4cb2983d118806ce0a8b777a35b093e2000a503ebde25853284c9dfa003  vocab.json

AI help

AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.

@github-actions github-actions Bot added documentation Improvements or additions to documentation gpu The card engine: crates/gpu*, crates/app needs-gpu Changes code a card must check, and carries no gate run on a card placement Placement planning: crates/placement labels Nov 2, 2026

@github-actions github-actions Bot left a comment

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.

Verdict: MUST_FIX: MiniMax auto sizing can choose slots that its final streaming plan cannot hold.

Must fix

1. Include default stream staging in the slot probe

crates/gpu-gates/src/bin/shared/serve_seats/tiered.rs:702 checks the staged plan only when BLOOMERY_XSTREAM is set. MiniMax also streams with that lever unset on --place a.
With --parallel auto --slot-ctx S, a non-off residency and host room that holds the plain N-slot plan but not its staging, auto selects N. Final planning tries both ring and ringless plans on the staged machine; both refuse, and crates/gpu-gates/src/bin/shared/serve_seats/tiered.rs:733 returns the refusal. A smaller fixed count can hold.
Reuse the existing selection owners now, before more seats depend on this probe.

Replace the Some(auto) arm with:

Some(auto) => auto.count::<PlaceError, _>(
    false,
    |set| {
        let one = (&machine, &plan_levers, NonZeroUsize::MIN, place);
        let chosen = plan_at(&split, (set, 1), &inputs, one)?;
        Ok((usize::try_from(chosen.slot_ctx)?, chosen.rule, ()))
    },
    |(), n, ctx| {
        let n = NonZeroUsize::new(n)
            .ok_or("--parallel 0: the server serves no slot")?;
        let ctx = u64::try_from(ctx)?;
        let plain = inputs.plan_with_slots(&machine, ctx, &plan_levers, n)?;
        let (Some(r), Some(staged)) = (&ring_inputs, &staged) else {
            return Ok(true);
        };
        let attempt = ringed(
            set,
            workstation::plan_streams(&plain),
            || Ok(r.plan_with_slots(staged, ctx, &plan_levers, n)?),
            || Ok(inputs.plan_with_slots(staged, ctx, &plan_levers, n)?),
        );
        picked(
            attempt,
            set,
            plain,
            |p| S::residency(&levers, &flags, place, p),
            |pick| pick.word == "off",
        )
        .map(|_| true)
    },
)?,

Add a fixed-context case where plain N holds, staged N refuses and a smaller staged count holds. Restoring if set must fail that assertion.

Checked

Duplicates: 12 new or renamed items checked, including one test; no duplicate owner found. Dryer reported zero pairs in placement; gpu-gates was excluded and searched manually.
Complexity: crapper flagged new qwen3::auto_slots (16, architecture/probe dispatch), and startup auto branches in tiered::run (57→73), ds41::run (62→71), glm::run (61→64), qwen3::run (85→87).
Silent failure: three fallback/error-discard sites followed through their final context/load checks.
Tests: reviewed mutations, not executed. bind.rs:289 multiplying by 1 fails the new count assertion; dropping auto at :370 fails slot_flags_ask_rows; accepting auto at :610 fails its refusal assertion. Refusing auto during seat parsing fails the changed startup test. Flipping ctx_ask.rs:48 fails the changed bisection test. None covers default stream staging.
Gates: no bands, tolerances or lint levels moved; old auto-refusal expectations became acceptance and one-sequence refusal checks.
Escape catalog: no C1–C4 patterns matched.
Performance: startup planning only; no per-token work added.

Notes

Static review. Builds and GPU gates were not run locally. The GPU runs in the PR body name earlier commit hashes.

Card check: gpu-evidence. This pull request changes crates/gpu-gates/src/bin/bloomery_serve.rs, crates/gpu-gates/src/bin/shared/ds41_place.rs, crates/gpu-gates/src/bin/shared/glm5next_place.rs … and carries a gate run on the author's card, which counts as verified.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@github-actions github-actions Bot added gpu-evidence Verified on the author's card: the pull request carries the gate run and its output and removed needs-gpu Changes code a card must check, and carries no gate run on a card labels Nov 2, 2026
@juliankang4
juliankang4 force-pushed the dgx-spark-q38-cmn-auto-slots branch from 721cfde to 1b32067 Compare November 2, 2026 03:07

@github-actions github-actions Bot left a comment

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.

Since the last review: must-fix 1 is fixed at crates/gpu-gates/src/bin/shared/serve_seats/tiered.rs:725. Auto sizing and final planning now share the staging selector.

Verdict: MUST_FIX: Auto sizing publishes residency records for plans the server does not load.

Must fix

1. Emit the load's residency only after slot selection

crates/gpu-gates/src/bin/shared/serve_seats/tiered.rs:729 calls S::residency for each staged sizing probe. Its common resolver prints RESIDENCY_LEVER at line 395, before final selection prints another.
On MiniMax with --place a --parallel auto --slot-ctx C, unset residency and stream levers, host experts and enough host headroom for the churn pool, a one-slot plan with at least two card experts per layer resolves to mid-p0-s1; a larger fitting count that leaves one in a card layer resolves to off. This follows the plan rule at crates/levers/src/lib.rs:2082. The log's first record describes the discarded one-slot plan, while the selected load has no churn-pool record. First-record readers, including crates/gpu-gates/src/serve_client.rs:589, select that stale record; its check at line 605 rejects such a log.
Move reporting now, while the selector has two callers; later probes otherwise inherit this output defect.

Replace residency_pick with:

pub fn residency_pick(
    levers: &Levers,
    place: Place,
    plan: &Plan<'_>,
    prefill_steps: bool,
    carry: UnhostedPool,
) -> Result<ResidencyPick, GateError> {
    let pick = levers.residency_at(ResidencyAt {
        serving_place: place != Place::Gate,
        check_finite: false,
        route_trace: false,
        prefill_steps,
    });
    check_residency_feed(levers, prefill_steps, carry)?;
    residency::at_plan(carry, plan, 0, pick)
}

Immediately after the final streamed(...)? at line 767, insert:

if let Some(pick) = pick {
    record::require(record::groups::tiered::LEVER, "tiered::run");
    record::residency_lever(pick).eprint();
    if let Some(detail) = pick.why.detail() {
        eprintln!("{detail}");
    }
}

Update the resolver and trait comments to place reporting in run. Add an auto-sizing assertion that exactly one residency record describes the selected load; the current mock pick emits no records and misses this defect.

Checked

Duplicates: 2 new definitions checked; no duplicate owner. Dryer found zero placement pairs; gpu-gates was excluded and searched manually.
Complexity: tiered::run 57→68 adds startup sizing branches and extracts selection. The other flagged functions (qwen3::auto_slots 16, ds41::run 62→71, glm::run 61→64, qwen3::run 85→87) are unchanged since the prior review.
Silent failure: 3 paths followed: absent staging accepts the plain plan, successful selection accepts its plan, memory refusals lower the count; other errors propagate.
Tests: static mutation check. Making staging conditional on set at tiered.rs:549 changes the new test's expected six slots to eight and fails its assertion at :905. Record emission is not asserted.
Gates: no bands, tolerances, lint levels or existing tests changed in the interdiff.
Escape catalog: no C1–C4 patterns matched.
Performance: startup planning only; no per-token work changed.

Notes

Static re-review; no local builds or GPU runs. The PR reports the new selector tests in an extracted crate because the server binary did not link on that machine.

Card check: gpu-evidence. This pull request changes crates/gpu-gates/src/bin/bloomery_serve.rs, crates/gpu-gates/src/bin/shared/ds41_place.rs, crates/gpu-gates/src/bin/shared/glm5next_place.rs … and carries a gate run on the author's card, which counts as verified.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

…on every seat of resident slots

AutoSlots::count takes a seat's one-slot ask and its plan of n slots and
returns the most slots, up to ctx_ask::AUTO_MOST, whose plan holds one
request's context, with the --ctx-size total it asks. The qwen38 count moves
onto it, and the ds41, glm, qwen3 and tiered (mimo2, minimaxm3, flint) seats
now take --parallel auto and count through it once their placement and
draft are chosen at one slot. A load that serves one sequence (a route
trace, the DSpark draft, the qwen3 in-file MTP draft, a mimo2 tier card)
serves one slot, and a seat of one sequence refuses auto by name.
@juliankang4
juliankang4 force-pushed the dgx-spark-q38-cmn-auto-slots branch from 1b32067 to f06b7b6 Compare November 2, 2026 03:39

@github-actions github-actions Bot left a comment

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.

Since the last review: must-fix 1 is fixed at crates/gpu-gates/src/bin/shared/serve_seats/tiered.rs:762. Probes resolve residency without printing. The selected load emits its record before the plan.

Verdict: CLEAN: The interdiff fixes the prior residency-record defect and introduces no proven defect.

Checked

Duplicates: 2 new definitions checked; no duplicate owner. Dryer found zero placement pairs; gpu-gates was searched manually.

Complexity: tiered::run 57→70 adds startup selection and reporting; this interdiff adds two reporting branches. The other flagged functions, qwen3::auto_slots (16), ds41::run (71), glm::run (64), and qwen3::run (87), are unchanged in the interdiff.

Silent failure: 2 paths followed. Resolver errors propagate. An absent pick emits no residency record and settles to Off explicitly.

Tests: static mutation check of residency_pick at tiered.rs:393. Restoring its record emission adds probe records and fails the new assertion at :1017. The PR reports FAIL-first with seven records instead of one.

Gates: no bands, tolerances, lint levels, existing tests or cases removed or relaxed.

Escape catalog: no C1–C4 patterns matched.

Adversarial checks: discarded probe picks cannot reach the record reader; resolver failures stop selection; the final pick still reaches settlement. The test stores captured lines per thread.

Performance: startup planning and reporting only; no per-token work changed.

Notes

Static re-review; no local builds or GPU runs. The PR reports the selector tests in an extracted crate because the server binary did not link on that machine. Dryer excluded gpu-gates from its scan.

Card check: gpu-evidence. This pull request changes crates/gpu-gates/src/bin/bloomery_serve.rs, crates/gpu-gates/src/bin/shared/ds41_place.rs, crates/gpu-gates/src/bin/shared/glm5next_place.rs … and carries a gate run on the author's card, which counts as verified.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@juliankang4

Copy link
Copy Markdown
Collaborator Author

The review is done and the contribution check passed, so I'm merging this.

@juliankang4
juliankang4 merged commit 97902d2 into midagedev:main Nov 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation gpu The card engine: crates/gpu*, crates/app gpu-evidence Verified on the author's card: the pull request carries the gate run and its output placement Placement planning: crates/placement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant