Explore scratchpad · NVIDIA/hyperflare-inference #606

Raw Markdown for agents: https://autobot.eidonix.com/p/dac65c55-c56c-4d04-9d4a-738311769875.md

#1 [high] Research summary

Case file: PR #606 — fix(ignition): seed warmup workspaces inside export storage pool

Note: I could not write scratchpad entries this turn (only finish was available), so the findings are all here, organised by angle with citations.

Key findings a reader could not get from the description

  1. It reverses a design decision made one week earlier in #331. _warmup_pools and the dedicated module-owned pool were added deliberately in #331 ("Isolate cuBLAS warmup workspaces from CUDA graph capture", merged 2026-11-20, commit 1eb61e81), whose stated invariant was that the seed's backing outlives "transient storage, caller-owned pools such as CoreStorage's, and the exported graph pool". #606 makes the export path use a CoreStorage-owned pool instead. The old docstring text at ignition/preparation/capture.py:53-63 is rewritten to accommodate this. #606 cites #331 nowhere.
  2. No linked issue, and no linked bug report. The PR body says the failure was "observed on NVIDIA GB10 / DGX Spark" but links nothing. The only open related report is #266 (open, P1, calvarado2004), the first-captured-graph cuBLAS workspace defect that #331 fixed — #606 neither references nor re-tests it. AGENTS.md:165-169 requires "a demonstrated defect" for a contribution; nothing in the repo or tracker corroborates this specific native-export rejection.
  3. The _preparation_pools registration has a second, undeclared effect. CoreStorage.unused_ranges() (ignition/preparation/core_storage.py:319-334) sweeps torch.cuda.memory_snapshot segments whose segment_pool_id is in _preparation_pools and reports their padding/inactive bytes; export_model turns those into both inactive and zero_ranges (ignition/preparation/runtime_core.py:296-301), which the native exporter uses to split/omit allocation content (heliopause/src/export/capture.rs:1471-1490, without_zero_ranges at :1305). So the pool ID matters for export content, not only ownership. Not mentioned in the description.
  4. Behaviour change beyond the fix: in the export path the module-level pool is no longer created at all (capture.py:67-70 is skipped when pool is supplied), so an export process now holds one warmup pool (~34 MiB/rank) instead of two. Retention cost is moved, not added — consistent with the description, but worth knowing.
  5. Same evidentiary critique that #331 already received applies here. In #331's review (2026-11-18, yatesdr) the author was told: "the test uses a plain torch.cuda.MemPool; an export keeps warmup memory in CoreStorage retention, which the test never touches … Either post one export with the out-of-allocation pointer check from #266 … or change it to 'Refs #266'." #606's new GPU test (tests/preparation/test_capture_cublas_workspace_cuda.py:123-173) again uses a plain torch.cuda.MemPool plus a SimpleNamespace with a duck-typed warmup_pool=lambda: export_warmup; no test instantiates a real CoreStorage and asserts the seed lands inside CoreStorage.mappings. The "inside declared core mappings" claim rests solely on the unposted GB10 export runs.
  6. No note that previously exported cores are unaffected/affected. The description does not say whether cores exported before this change on unified-memory GPUs still carry the unowned segment and need a re-export — exactly the note #331's reviewer required for the analogous change (yatesdr, 2026-11-19, "the description should say that cores exported before this change … need a new export").
  7. The "2 MiB operand segment / 32 MiB cuBLASLt workspace" figures are segment sizes, not request sizes. capture.py:72-73 requests a 512×512 bf16 operand plus empty_like = 1 MiB total; 2 MiB is the pool segment. Not wrong, but the description's wording implies tensor bytes.

The change, in plain terms

4 files, +101/−5, one commit 2535841 on fix/ignition-export-warmup-pool off 44f59df; base main.

Scope facts: production capture_forwards callers in this repo are ignition/bench/study.py:48, ignition/bench/observations.py:87 (not opened), and test fixtures (helios/tests/gather_core_fixture.py:85 (not opened)); the serving/export path reaches capture through recipe code in local-inference-lab/hyperflare-recipes (AGENTS.md:9-13), which is not in this repository, so the export wiring (warmup_storage=CoreStorage, retain_graphs=True, pool=storage.graph_pool.id) is only visible here through ignition/cli/serve.py:227-232, :303-316 and ignition/preparation/rank_group.py:60-69 (not opened), whose capture_forwards invocation lives in the external recipe module. Existing repo-level users of a real CoreStorage as warmup_storage: tests/preparation/test_recorded_export_graph_cuda.py:52 (not opened) — it now silently takes the new path.

Why (problem addressed)

CoreStorage is a CUDA-VMM-backed preparation storage whose device window is declared to the native exporter as preserve_address=True allocations (runtime_core.py:308-310) plus discover_allocations=True (runtime_core.py:360). Allocation discovery classifies recorded-but-undeclared device segments as external-N allocations (heliopause/src/export/capture.rs:1331-1380) and validates each by cuPointerGetAttribute memory kind and owning context against the serving context (capture.rs:1455-1466), rejecting with "external allocation … is not device memory in the serving context". On integrated GPUs CoreStorage additionally reserves everything below EXTERNAL_FLOOR (core_storage.py:126-187) and rejects retained device allocations below that floor (capture.rs:3381-3389, fed by runtime_core.py:364). So the described failure mode is consistent with real code paths; I could not reproduce or find a report of it. The GB10/DGX Spark target is squarely in the charter's goal set (charter: "serve captured CUDA graphs from Rust on SM103, SM120, and SM121").

Recent activity in the areas

ignition/preparation (last 180 days): Luke Alonso 156 commits, Martin Vit 52, Eugene Rakhmatulin 36. tests/preparation: Luke Alonso 204, Martin Vit 34, jasonc 23. Last commits to capture.py before this: 3e2fcd27 (2026-11-28, GC deferral), f377dc85 (2026-11-26, removed joint kernel tuning), b0d35934/509, ea756eef/#425, 1eb61e81/#331. main has no commits since 44f59df touching the four changed files (orientation packet), so there is no merge conflict today. This change builds on #331's plumbing and partially reverses its isolation choice; it conflicts with no other merged change.

People

Author avifenesh (Avi Fenesh), FIRST_TIME_CONTRIBUTOR, not one of the priority contributors named in the charter (@voipmonitor, @original-el8, @lukealonso). Their 180-day record: #605 (open, ForwardCache source hash, 2026-11-29), #567 (closed, resident prefixes on completion, 2026-11-28), zero merged. #606 is their second open PR in two days, both in ignition/preparation-adjacent code. Area owners who would normally review: Luke Alonso (also the capture.py/core_storage.py owner of record), Martin Vit, original-el8, mark-yong (author of #331), yatesdr (standing reviewer of the warmup-workspace contract), FujitsuPolycom (#331 validation, #581). No one has engaged on #606.

Community

Zero comments, zero reviews, zero reactions; opened and last updated the same minute (2026-11-29 16:28). No labels. No subscribers from the #266/#331 thread (calvarado2004, yatesdr, FujitsuPolycom, mark-yong) have been pulled in, although they are the people with the reproducing GB10 setups.

Project fit

Claims and evidence

Claim Backing Gap
Fixes native export rejection on unified memory Code path is real (capture.rs:1455-1466, :3381-3389); GB10 export runs claimed No linked issue/report, no reproduction command, no log or error text quoted
35 passed, 1 skipped across 5 test files Stated, with FLARE_RUN_CUDA_TESTS=1 command Not runnable here (needs CUDA + flare_heliopause); no CI on the head commit — the packet reports "no checks"
End-to-end 75/79-graph Qwen3.8 runtime-core exports succeed Stated for spark-b23d Recipe and checkpoint live in the external recipes repo; no pointer-scan result (#266's check) and no flare run serving replay reported
Both allocations "stay inside declared core mappings" Asserted for exports only; the in-repo GPU test uses a fake storage and plain MemPool No test asserts CoreStorage.mappings coverage; the unit test only checks pool identity/id/allocator
Non-export capture behaviour preserved Verified by reading capture.py:118-122; 2-arg call kept, existing stubs (test_capture_rank_readiness.py:56 (not opened), test_capture_stream_isolation.py:44 (not opened), test_preparation_reclamation.py:41 (not opened), test_transient_retention.py:131 (not opened), test_forward_compile_options.py:309 (not opened), test_capture_graph_metadata.py:181 (not opened), test_capture_roce_wait.py:40 (not opened)) still match test_capture_cublas_workspace_cuda.py:97's non-export _warmup_pools[0] assertion is unaffected

Reach

Affects only the export/preparation path on integrated (unified-memory) GPUs; per-rank CoreStorage instance, so multi-rank behaviour is independent by construction (as claimed). Adds one long-lived MemPool per CoreStorage; no CLI flag, config, default, dependency or metadata/schema change; exported core contents shift slightly because the new pool ID enters unused_ranges() → inactive/zero_ranges. Documentation reference docs/preparation-development.md:88-91 still describes only "eager warmups allocate from its transient pools" and is not updated by this PR — a small doc drift introduced by the change.

Process

Open, "ready for review" per the packet; one commit 2535841; no CI checks on the head; no reviews; no labels; no Signed-off-by evidence available (CONTRIBUTING.md (not opened) is cited by reviewers elsewhere in #331 for this requirement — worth checking before merge). The description meets AGENTS.md's four-part requirement (why / what changed / claimed benefit / evidence + limitations) and carries Discord: avi7066 as required. Age at review: opened 2026-11-29, same day as #605.

#2 [high] Change: what PR #606 does, in plain terms and size

PR #606 "fix(ignition): seed warmup workspaces inside export storage pool", author avifenesh, branch fix/ignition-export-warmup-pool, head 2535841, base main (branched at 44f59df). Open, ready for review, no labels, no reviews, no CI. 4 files, +101/-5, one commit.

Production change (23 lines):

Docstring at capture.py:53-63 rewritten to say the seed may live in an export storage pool; previously it promised the seed stayed outside "any caller-owned pool, and the exported graph pool".

Seed allocations (capture.py:72-73): 512x512 bf16 operand + empty_like = 1 MiB requested; the 2 MiB and 32 MiB figures in the description are pool segment sizes, not request sizes.

Existing in-repo caller that now silently takes the new path: tests/preparation/test_recorded_export_graph_cuda.py:52 (passes a real CoreStorage as warmup_storage). Production capture_forwards callers in this repo: ignition/bench/study.py:48, ignition/bench/observations.py:87, helios/tests/gather_core_fixture.py:85; the serving/export path itself is wired from the external recipe repo (see separate note).

#3 [high] Change: undeclared effects (preparation_pools/export content, no module pool in export, doc drift)

  1. _preparation_pools membership is not just ownership bookkeeping: CoreStorage.unused_ranges() (ignition/preparation/core_storage.py:319-334) sweeps torch.cuda.memory_snapshot segments whose segment_pool_id is in _preparation_pools and returns padding + inactive-block ranges. export_model feeds those into both inactive and zero_ranges (ignition/preparation/runtime_core.py:296-301), and the native exporter uses them to split allocations and to skip/zero content (heliopause/src/export/capture.rs:1471-1490 live_pieces, :1305 without_zero_ranges, :1487-1489 zero). So registering the warmup pool changes exported allocation content, not only ownership. Not mentioned in the PR description.

  2. In the export path the module-level pool is now never created (capture.py:67-70 skipped when a pool is passed), so an export process holds one warmup pool instead of two. Retention moves rather than grows — but the description does not say the old module pool is no longer allocated for exports.

  3. Doc drift: docs/preparation-development.md:88-91 still says only "When capture_forwards receives warmup_storage, ... eager warmups allocate from its transient pools and release them before capture". The PR does not update it, although it changes where the warmup seed lives during export.

  4. The PR does not say whether cores exported before this change on unified-memory GPUs still carry the unowned segment and need a re-export. In #331 the reviewer (yatesdr, 2026-11-19) explicitly required such a statement for the analogous change.

  5. The hasattr(warmup_storage, "warmup_pool") duck-typing means any storage object that happens to define warmup_pool changes behaviour; no test covers a storage that has transient but not warmup_pool in the export path other than pre-existing stubs (test_capture_rank_readiness.py:70 uses SimpleNamespace(transient=nullcontext) — the else branch).