Explore scratchpad · NVIDIA/hyperflare-inference #661

Raw Markdown for agents: https://autobot.eidonix.com/p/8ea5f197-5244-4b48-9a73-5ea7db2a1b7c.md

#1 [high] Change: what PR #661 does (verified from diff)

PR #661 (FujitsuPolycom/Dooner), draft, base main, head 29f2b5b, opened+updated 2026-12-01. Labels area:scheduling, enhancement, performance. 10 files, +1785/-95 (desc says +312 net prod LOC / +391-79 in 4 scheduler files).

Verified diff by file:

#2 [high] Related work: #645 (merged 2026-11-30) introduced exactly the mechanisms #661 modifies

#645 "Overhaul Helios prefill scheduling, cost modeling, and two-frame pipelining", by Luke Alonso (lukealonso, COLLABORATOR), opened+merged 2026-11-30, +1886/-204, 21 files. Closes #485. This is the direct parent of #661's mechanism:

#3 [high] Related work: #538 (same author) added natural-fit discovery that #661 relaxes; it caused a 15.3 s regression fixed by #550

PR #538 "Restrict cold pure-prefill discovery to natural-fit graph capacities" by FujitsuPolycom (same author as #661), opened 2026-11-26 16:22, merged 2026-11-26 17:21, +451/-12, 3 files (policy.rs, policy_tests.rs, docs/scheduling-runtime-design.md). Introduced natural_fit_prefill_capacity — the exact restriction #661 now relaxes under active age-priced streams. So #661 is the author revisiting their own earlier, now-merged design. Autobot review on #538 recommended "Changes Requested" with 0 blockers and 3 should-fix items, notably:

#4 [high] Related work: #550 (merged) fixed a #538-caused GB10 15.3s prefix-cache regression; #661 edits the same doc paragraph

PR #550 "Restore prefix checkpoints on prefill catalogs without terminal prefill" by iein (CONTRIBUTOR), merged 2026-11-28, +71/-15, 2 files (docs/scheduling-runtime-design.md, helios/src/scheduler/checkpoints.rs). Applies the terminal-catalog pricing rule to every catalog in checkpoints.rs so unmeasured non-target capacities don't make a checkpoint cut's price "unknown". This is the direct predecessor of the doc paragraph #661 edits at docs/scheduling-runtime-design.md ("Pricing skips unmeasured capacities that consume no additional tokens over a smaller capacity, and unmeasured capacities other than the chunk's pricing capacity"). Measured evidence in #550: Inkling 2 Small NVFP4 TP4 on 4× DGX Sparks (GB10), core without terminal prefill: build f377dc85 (main after #538+#543) = 29 tokens reused / 15.3 s TTFT on an exact 31K repeat; c915b5f0 (before both) = fully reused / 0.02 s; #550 = fully reused / 0.02 s. Also Inkling 2 Mini TP1 DGX Spark (GB10) probes. => #661's expansion of unmeasured-shape eligibility via interpolation and its interaction with deferred_prefill/checkpoint pricing touches the exact area of this GB10 regression. Relevant: #661 also edits the same doc paragraph. Related open issues citing #550: #534 (checkpoint captures deadlock on unmeasured snapshot cost), #600 (TP2 EXL3 multi-turn prefix cache miss).

#5 [high] Related work: #663 (open, yatesdr) is the complementary sibling scheduler PR; stacked A/B evidence lives in its comments

#663 (open, yatesdr, COLLABORATOR) "helios/scheduler: price first-output waiting age on incumbent decode rounds" is the sibling/complementary scheduler PR. #661 mentions it; #663's own description explicitly names #661: "PR #661 enables smaller prefill chunks to protect active decoder cadence from long cold prompts; this change addresses the inverse side — keeping waiting prompts from starving behind active decode cohorts." Both edit the same --scheduler-policy balanced (decode_age_price = 0.1) path; #663 changes service.rs delivery_references -> delivery_references_and_decode_batch, utility.rs LaneValue, policy.rs lane_values, runtime.rs readmission. #661 changes service.rs service_rates, policy.rs catalogs, scheduler.rs feedback barrier. Files in common between #661 and #663: helios/src/scheduler.rs, policy.rs, policy_tests.rs, service.rs, docs/scheduling-runtime-design.md, scripts/scheduling_sim/utility.py (via #663), tests/test_scheduling_utility.py. #663 exists because flare-autobot opened duplicate draft #662 by mistake (closed 2026-12-01 19:40, "Closing duplicate draft opened under the wrong account; reopening under yatesdr"). Key cross-evidence (comment by FujitsuPolycom 2026-12-01 22:09 on #663): independent SM120 TP4 (4x RTX PRO 6000 Blackwell) paired A/B of #663 solo and stacked with #660 (22cac916) + #661 (fdb10bb5) against main a3c80e19, on a single signed DeepSeek-V4.1-Flash-1017 TP4 core. Reported that solo #663 raises >250 ms stall counts (mixed-c32 206 -> 431; heavy mix 1,235 -> 2,018) because mean active decode concurrency rises, and that stacking #661 cuts them to 91 (-78.9% vs solo #663, -55.8% vs base) and 523 (-74.1% / -57.7%), with mixed-c32 gap p99 203.1 ms (-10.6% vs base). Also: "Clean composition with #660 + #661: Zero semantic production conflicts (1 adjacent-function insertion in policy.rs and 2 test-fixture adjustments in policy_tests.rs; 424/424 scheduler:: tests pass)." => This is the only measured interaction evidence for #661 and it uses fdb10bb5, not the pushed head 29f2b5bc. Also notable: the mixed-c32 base numbers in this comment (1,055.7 tok/s, gap p99 227.3 ms) differ from #661's description (1,072.8 tok/s, gap p99 237.2 ms), i.e. different runs/baselines.

#6 [high] Related work: #660 (same author) shares #661's exact mixed-c32 baseline but reports 215 -> 434 stalls where #661 reports 215 -> 78

#660 (open, FujitsuPolycom, same author as #661) "helios/scheduler: budget interior conversation-anchor splits against checkpoint_extra_work_fraction", opened 2026-12-01 19:02, head cf744df (predecessor 22cac916), +887/-151, 12 files (checkpoints.rs +751/-87, docs/cli-design.md, docs/core-design.md, docs/scheduling-runtime-design.md +8/-9, helios/README.md, policy_tests.rs, tests.rs, phase_tests.rs, check.py). Same investigation series with #661: both target --scheduler-policy balanced prefill/decode contention on DeepSeek-V4.1-Flash TP4 on 4x RTX PRO 6000. #660's mixed-c32 base numbers are IDENTICAL to #661's head-row baseline (1,072.8 tok/s output; #660 base 5d53040e), so both PRs share the same base commit and the same mixed-c32 harness. #660 delta: SLO pass 9.1% -> 80.3%, output 1,072.8 -> 1,327.0 tok/s, TTFT p50 4,577 -> 1,920 ms, mean decode batch 9.13 -> 17.91. #660 explicitly discloses trade-offs: per-user p50 drops 93.9 -> 71.0 tok/s and >250 ms gaps rise 215 -> 434. => Direct implication for #661: #661's mixed-c32 baseline row (215 >250 ms stalls at base, 1,072.8 tok/s) is the same measurement #660 reports, but #661 claims 215 -> 78 stalls without #660 while #660 claims 215 -> 434 stalls for its own change. The two PRs move the same metric in opposite directions and are both open; #661's description does not mention #660 at all. Only FujitsuPolycom's comment on #663 shows them measured together. Autobot review of #660: 0 blockers, 2 should-fix; Merge Risk Medium; flagged "Rebase conflict with #655 ... #655 edits the same checkpoint_selection_uncached function" and "conflicts directly with open Ready-To-Merge #655 in checkpoints.rs and docs/". Files in common with #661: helios/src/scheduler/policy_tests.rs, verification/helios-lifecycle/check.py, docs/scheduling-runtime-design.md, helios/README.md (4 per orientation packet).

#8 [high] Change: undeclared reach — the feedback barrier also fires under --scheduler-policy throughput when a terminal-cleanup stream exists

Verified in code: PolicyConfig::default() sets decode_age_price: 0.1 (helios/src/scheduler/policy.rs:35) and terminal_age_price: 1.0 (:37); the throughput() preset is Self { delivery_fairness: 0.0, decode_age_price: 0.0, ..Self::default() } (:50-52) — it does NOT zero terminal_age_price. has_active_age_priced_stream() (helios/src/scheduler.rs:989-998) returns true if any slot satisfies terminal_cleanup(r) && policy.terminal_age_price > 0.0 OR policy.decode_age_price > 0.0 && phase in {Decode, Resume}. prefill_step_requires_feedback() now early-returns true when that holds (scheduler.rs:1180-1183). Consequence: under --scheduler-policy throughput (decode_age_price = 0.0), a non-terminal Prefill step still loses two-frame pipelining whenever a terminal-cleanup stream (e.g. Snapshot/Endpoint capture of a finishing request) is resident, because terminal_age_price is still 1.0. The PR description's "solo prefill and throughput (0.0) keep two-frame pipelining" is only true when no terminal-cleanup stream is active. The PR's own new test asserts this explicitly: has_active_age_priced_stream_covers_resume_and_terminal_cleanup_branches in helios/src/scheduler/policy_tests.rs does t.configure_policy(PolicyConfig::throughput()), then assert_eq!(t.policy.decode_age_price, 0.0); assert!(t.policy.terminal_age_price > 0.0); and asserts has_active_age_priced_stream() is true and plan_requires_feedback(&plan) is true for a nonterminal Prefill; zeroing terminal_age_price restores pipelining. The docs ARE accurate here — docs/scheduling-runtime-design.md says pipelining holds "only when no active age-priced decoding, resume, or terminal-cleanup stream exists". So this is a description-vs-code (not docs-vs-code) mismatch. Also means the "SM120 throughput launches identical (28/24/19)" claim does not cover the terminal-cleanup case. Also: prefill_step_requires_feedback is one of the two places where feedback is decided; the other gates in plan_requires_feedback (stale cost, probe, grammar) are unchanged.

#9 [high] Project fit: docs/scheduling-theory.md:74-76, 93-97, 119-120 say prefill has no cadence and needs no smaller chunks — #661 leaves that file untouched

docs/scheduling-theory.md states the theory #661 departs from, and #661 does NOT update this file (its doc diff touches only docs/scheduling-runtime-design.md and helios/README.md):

#12 [high] Claims: A/B numbers are author-reported on fdb10bb5, not head; throughput-keeps-pipelining claim contradicted by code; no in-repo benchmark reproduces the workloads

Claims vs backing in #661's own description (nothing here is verifiable from the repo; all of it is author-reported): Backed by code in the diff (verified):

#13 [high] Reach: activates by default on --scheduler-policy balanced, no flag, reverses #645's pipelining, widens the deferred_prefill rule

Reach / configuration & compatibility (verified):

#15 [high] Why: cold long prompts stall decoders on balanced because of cast-catalog mismatch + nat-fit discovery + two-frame pipelining; lineage via #485/#538/#550

The "why" of #661 (problem + lineage of the want): Problem as stated: under --scheduler-policy balanced (decode_age_price = 0.1), Helios interleaves smaller prefill chunks with decode steps because it has no mixed prefill-decode graphs on DeepSeek-V4.1-Flash TP4. Three coupled mechanisms make cold long prompts stall active decoders for seconds:

  1. TERMINAL_PREFILL catalogs start at 256 while PREFILL starts at 128, so a 128-token shape is non-terminal-only and cannot be used for a tail.
  2. Unmeasured smaller Prefill shapes are skipped by cold discovery (#538's natural-fit restriction), so once the largest graph is measured the scheduler keeps choosing it.
  3. Tails up to max_terminal (16384) run as ONE TerminalPrefill, and consecutive non-terminal Prefill steps fill both transport frames (#645), so decoders wait for both. Wanted-since / how widely: the underlying complaint predates #661 by at least a week of merges:

#17 [high] Project fit: served A/B over main satisfies charter #210; docs/design-review.md Layer-2 simulator + learning.py gate is explicitly unrun; theory doc contradicts

Charter / roadmap mapping (facts, from read_charter + docs/design-review.md):

#18 [high] Research summary

I built the case file for PR #661 in 17 scratchpad entries covering every required angle (change, why, related work, recent activity, people, community, project fit, claims and evidence, reach, process).

Headline findings a reader could not get from the description:

  1. The measured build is not the shipped build. #661's SM120/GB10 A/B ran on fdb10bb5; head is 29f2b5bc and the PR's own Limits section says the A/B predates the resize_prefill deferred_prefill guard and doc/test hardening.
  2. "throughput (0.0) keeps two-frame pipelining" is false in one case. PolicyConfig::throughput() zeroes decode_age_price but leaves terminal_age_price = 1.0 (policy.rs:50-52), and has_active_age_priced_stream() (scheduler.rs:989-998) checks it, so non-terminal Prefill still drains whenever a terminal-cleanup stream is resident. #661's own test has_active_age_priced_stream_covers_resume_and_terminal_cleanup_branches (policy_tests.rs:7745) asserts this.
  3. #661 reverses work merged one day earlier. #645 (lukealonso, merged 2026-11-30) introduced GraphKind::Prefill two-frame pipelining, prefill_step_requires_feedback, effective_prefill_catalog and PrefillCostModel — every mechanism #661 now narrows or replaces.
  4. Sibling PRs and a head-to-head contradiction. #660 (same author) shares #661's exact mixed-c32 baseline (1,072.8 tok/s, 215 stalls) but reports >250 ms stalls going 215 → 434, where #661 reports 215 → 78. Neither description mentions the other. #663 (yatesdr) is the inverse-side sibling; the only stacked A/B for #661 lives in a comment there.
  5. A documented mandatory gate is explicitly unrun. #661 changes graph selection and timing estimation, which docs/design-review.md:195-208 says requires the scripts/scheduling_sim/learning.py (not opened) 64-seed catalog; the PR discloses learning_policy.py (not opened) unrun, and the simulator has no concept of an unmeasured cost, so the interpolation has no simulator equivalent.
  6. docs/scheduling-theory.md still states the opposite (:74-76 no per-chunk prefill cadence; :93-97, :119-120 no prefill-size preference, "two long prefills do not need smaller chunks merely to alternate"). #661 updates scheduling-runtime-design.md and helios/README.md but not that file.
  7. Undeclared kind change: resolve_prefill_kind_from now resolves every capacity outside terminal_prefill_catalog to TerminalPrefill whenever deferred_prefill is set, not just tails (scheduler.rs:896-902). It tightens #613's invariant but is only obliquely mentioned.
  8. Zero engagement: no comments, no reviews, no CI, no reactions, no triage: label, draft, one commit stacked on 5d53040e and behind a3c80e19.

I also recorded the problem lineage (#485 → #538 → #550, including iein's measured 0.02 s → 15.3 s GB10 prefix-cache regression caused by #538's natural-fit restriction, and #550's fix), the full related-work graph (#426, #352, #479, #510, #613, #655, #69, #534, #600, #542, #571, #334, closed #654), the people map (FujitsuPolycom's scheduler series; lukealonso's ownership of the changed code; yatesdr, logprobz, iein, voipmonitor, original-el8), and a charter/design-review mapping showing where the PR aligns (no flags, no model branches, no ABI change, served A/B over main on target hardware) and where it does not (implicit default-on change under balanced, Layer-2 gate unrun, theory-doc contradiction).

#19 [high] Recent activity: what changed in these areas just before #661, by whom and why

Recent activity on the files #661 changes (helios/src, scripts/scheduling_sim, docs, tests, verification), from the orientation packet plus search_history ref=main for helios/src/scheduler/policy.rs and cost.rs:

Base commit of #661 is 5d53040e (2026-12-01, yatesdr, "helios: gate offload Copy Engine batches during peer-copy graphs", #628). Main has since advanced to 5c0d9c67 (#666, Jason Cook, RoCE dual-rail spread) and a3c80e19 (#657, Luke Alonso, mDNS _ai-gateway._tcp advertise). #663's baseline is a3c80e19, and #660 rebased onto 5d53040e with "0 conflicts vs a3c80e19" — so #661 is 2+ commits behind main and its own authors' sibling PRs are already rebased past it.

Scheduler commits immediately preceding, newest first (all within ~10 days, from search_history on policy.rs/cost.rs):

People density in these files (180 days): helios/src — Luke Alonso 235 commits, Martin Vit 52, yatesdr 48; docs — Luke Alonso 390. So #661 is authored by a non-dominant contributor on code that the dominant maintainer rewrote the day before.

Same-day cluster (2026-12-01) of scheduler PRs, all open, all touching overlapping files: #660 (FujitsuPolycom, checkpoints/anchor splits), #661 (FujitsuPolycom, prefill chunking), #655 (yatesdr, snapshot cost retention, Autobot: Ready To Merge), #663 (yatesdr, first-output age; #662 is its closed bot-duplicate). That is 4 open scheduler PRs by 3 people in one day on the same policy.

#7 [medium] Related work: #654 (closed, opt-in knob) is superseded by #663; its benchmark harness is not carried forward

#654 (closed 2026-12-01 22:02, logprobz, CONTRIBUTOR) "Add opt-in first-output age pricing and returning-agent benchmark", +4940/-126, 26 files. This is the opt-in (--scheduler-first-output-age-price, default 0.0) predecessor of yatesdr's zero-knob #663/#662, and #663's description says it "derives from and consolidates the returning-prompt investigation in #654 (co-authored with @logprobz)". Closed, not merged; logprobz's 2026-12-01 21:58 review on #663 recommends using #663 as the basis and splitting #654's benchmark/analyzer into a separate PR. #654 shipped scripts/benchmark_ready_prefill.py (+557) and scripts/analyze_ready_prefill.py (+456), a returning-agent benchmark that no open PR currently carries into main. Relevant to #661 because #654's sigma/F machinery and its first_output_tests.rs are the measurement framework for the same balanced-policy stall problem. Autobot found a formula monotonicity inversion in #654 (F > A makes slower graphs earn more credit per ms) — the exact failure mode #663's age_ms * frac formulation avoids, and the reason #661's ValueRate interpolation must also be monotone (its interpolated_prefill_duration clamps non-monotonic timings, see cost.rs). Not a competitor to #661; both #661 and #654 target the same balanced stalls but from opposite sides (chunk sizing vs waiting-prompt priority).

#10 [medium] People: author's scheduler series, and lukealonso/yatesdr/logprobz/iein/original-el8 roles in these files

People (all verified from item metadata):

#11 [medium] Community: #661 has no comments, no reviews, no CI, no reactions; only the author's own comment on #663 speaks to it

Community (#661 itself): zero comments, zero reviews, no CI checks on head 29f2b5bc, opened and last updated 2026-12-01, marked draft (pr_comments returned "No comments"). No reactions. So there is no direct community engagement yet. Indirect engagement that exists for #661:

#14 [medium] Process: draft, one commit atop 5d53040e, no CI, no review, no triage label, behind main a3c80e19

Process (verified):

#16 [medium] Related work: the rest of the dependency graph (#426, #479, #510, #613, #655, #69, #534, #600)

Related work, remaining items worth recording:

#20 [medium] Process: state, CI, review, size, stack position, and sequencing risk

#661 process facts: