Explore scratchpad · NVIDIA/hyperflare-inference #684

Raw Markdown for agents: https://autobot.eidonix.com/p/7a0c1340-9aef-4dd2-a24c-e71faaacea11.md

#1 [high] Change: what the diff actually does (2 files, +19/−9)

Head 6991986 (base main 2acc3f3). 2 files, +19/−9. Full diff read.

ignition/components/flashinfer_sampling.py:

ignition/components/sampling.py:

Behaviour kept: the same helper is used by both the captured path (__call__ → _filter_scores(self.scratch_tensors), sampling.py:599-607) and the dynamic/functional path (run → _filter_scores(scratch, local=True, row_inputs=...), sampling.py:656-674), so both now do one launch. Invalid rows stay benign because _sanitize_scores writes a dummy one-hot (sampling.py:304-312) and _normalize_probs writes 1.0 at token 0 when mass<=0 (sampling.py:324-332), so no NaN reaches the batched kernel for dead rows; _complete ignores rows whose epoch/slot don't match (sampling.py:363-378).

Dead code left behind: sample_probabilities (and its new row_independent_rng kwarg, and return_valid) now has no caller anywhere in the repo (search: only definition remains); verify_chain likewise unused in-tree (flashinfer_sampling.py:50-54).

#2 [high] Undeclared: docstring and design docs still mandate the per-row loop

Not mentioned in the PR description, and not touched by the diff:

  1. PreparedSampling class docstring still says the opposite of the new code: "Each row uses a separate FlashInfer call with device seed and / offset=4*counter. CUDA's Philox subsequence is therefore zero regardless / of packed row or physical slot." (ignition/components/sampling.py:459-473, quoted text at 467-469). The diff changes _filter_scores (sampling.py:596) but not this docstring, so the file now contradicts itself.

  2. docs/core-design.md:1289-1294 states as the runtime contract: "Pass device seed and offset tensors to FlashInfer's sampler. Each request uses a one-row draw with Philox subsequence zero and word offset 4 * counter, so batch packing cannot change its random stream." A batched launch makes "one-row draw" false; the property that must be preserved is only the (seed, offset) → token mapping.

  3. docs/mtp-design.md:486-490 is the doc that anticipated exactly this change: "The ordinary decode sampler (ignition/components/sampling.py) uses one-row FlashInfer calls so Philox subsequence zero is independent of packed lane position. Preserve this property for speculative requests: use per-request one-row chain invocations ... unless a library API supplies an equally qualified request-keyed stream." So the change uses the documented escape hatch, but the doc's statement about the ordinary decode sampler is now stale and neither doc is updated.

Also stale after this PR: philox4x32_reference's documented law "FlashInfer samples from the first word with CUDA curand_uniform conversion and an explicit offset of 4*counter" (sampling.py:236-242) now depends on FlashInfer's row_independent_rng implementation rather than on the one-row-per-call construction.

#3 [high] Dependency: repo tracks FlashInfer main, so "update the pin" has no file to change

The PR says "Merge local-inference-lab/flashinfer#208 and update the FlashInfer pin before merging this PR." In this tree there is no pin file to update:

Consequences for this PR: (a) "update the pin" is already satisfied automatically once FlashInfer main carries #208 — anyone who runs uv sync gets it, which also means the PR body's merge-order requirement is not enforced by any file in the repo; (b) the charter line "pin dependencies to exact versions or commits (#215)" (charter, How We Work) is in tension with the current branch-tracking setup, and #215 itself was closed by yatesdr on 2026-11-19 with "Flare keeps the exact FlashInfer pin (pyproject.toml:25)"; commit 10467f1a ("Track FlashInfer main in pyproject.toml", 2026-11-20, Luke Alonso) is the change that moved the other way. That history is context a reviewer of this dependency-requiring PR needs.

#4 [high] Claims/evidence: node-count claim has no CI coverage; GPU test that would prove it is skipped

#5 [high] Related work: #658 shares the file, #673 shares the component family, #555 multiplies the graphs

#8 [high] Project fit: no served-workload benchmark (charter #210) and an unmerged dependency against the pin rule (#215)

#11 [high] Claims: docs/performance-work.md and core-design.md prescribe exactly the measurement this PR did not run

docs/performance-work.md:35-59 ("Measurement") specifies the project's own bar for this class of change and names the tooling:

#6 [medium] Recent activity: nothing conflicting landed in ignition/components since the PR branched

#7 [medium] People: author is a charter priority contributor and the sampling.py owner; no reviewers engaged

#9 [medium] Reach and compatibility: shared sampler for every recipe, no ABI change, SM120-only evidence

#10 [medium] Process: open/ready, no CI checks, no review, no Autobot case file, ungated merge-order dependency

#12 [medium] Coverage: verdicts on every lead in the orientation packet

Followed every lead in the orientation packet: