#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
- It reverses a design decision made one week earlier in #331.
_warmup_poolsand the dedicated module-owned pool were added deliberately in #331 ("Isolate cuBLAS warmup workspaces from CUDA graph capture", merged 2026-11-20, commit1eb61e81), whose stated invariant was that the seed's backing outlives "transient storage, caller-owned pools such asCoreStorage's, and the exported graph pool". #606 makes the export path use aCoreStorage-owned pool instead. The old docstring text atignition/preparation/capture.py:53-63is rewritten to accommodate this. #606 cites #331 nowhere. - 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. - The
_preparation_poolsregistration has a second, undeclared effect.CoreStorage.unused_ranges()(ignition/preparation/core_storage.py:319-334) sweepstorch.cuda.memory_snapshotsegments whosesegment_pool_idis in_preparation_poolsand reports their padding/inactive bytes;export_modelturns those into bothinactiveandzero_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_rangesat:1305). So the pool ID matters for export content, not only ownership. Not mentioned in the description. - Behaviour change beyond the fix: in the export path the module-level pool is no longer created at all (
capture.py:67-70is skipped whenpoolis 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. - 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 plaintorch.cuda.MemPool; an export keeps warmup memory inCoreStorageretention, 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 plaintorch.cuda.MemPoolplus aSimpleNamespacewith a duck-typedwarmup_pool=lambda: export_warmup; no test instantiates a realCoreStorageand asserts the seed lands insideCoreStorage.mappings. The "inside declared core mappings" claim rests solely on the unposted GB10 export runs. - 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").
- The "2 MiB operand segment / 32 MiB cuBLASLt workspace" figures are segment sizes, not request sizes.
capture.py:72-73requests a 512×512 bf16 operand plusempty_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.
ignition/preparation/capture.py:52—_seed_warmup_workspaces(stream, device, pool=None); the_warmup_pools[index]lookup/creation (:67-70) now only runs when no pool is passed.ignition/preparation/capture.py:118-122—capture_forwardsaskswarmup_storage.warmup_pool()when the storage object has it (hasattrduck-typing) and passes it; otherwise it keeps the exact 2-argument call.ignition/preparation/core_storage.py:300-309—CoreStorage.warmup_pool()lazily builds onetorch.cuda.MemPool(self._allocator.allocator()), caches it onself._warmup_pool(viagetattr, not declared in__init__, unlike_retention_poolatcore_storage.py:73), and addspool.idto_preparation_pools. Same shape asscratch_pool()(:294-298) andtransient()(:277-282).- Tests:
tests/preparation/test_core_storage.py:83-105(CPU, monkeypatchedFakeMemPool, asserts reuse, allocator identity, id registration) andtests/preparation/test_capture_cublas_workspace_cuda.py:123-173(GPU-gated onFLARE_RUN_CUDA_TESTS=1).
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").
Related work
- #331 (merged) — introduces the code being changed; see Key findings 1 and 5. Tracked issue #266 (open, P1) and follow-up #395 (open,
CUDAGraph.reset()shares stream workspace). - #425 (merged,
ea756eef, "Order compiled forward warmup by largest CUDA allocation request") and #543 (merged,f377dc85) both last touchedcapture.py's warmup path before this PR; #559 (3e2fcd27) touchedcapture_forwards. - #394 (open) "Assemble temporary core payloads in the rank export workspace" and #605 (open, same author: ForwardCache source hash) run in the same neighbourhood; #581 (open,
FujitsuPolycom) also editscapture.py(node-priority flag) — a file-level conflict candidate.related_itemsadds #410, #297, #246, #509, #479, #474, #465, #432, #427, #408, #262, #245, #222, #122, #110 as file-overlapping PRs. No competing/duplicate fix for this specific problem was found in the local tracker. - Native-side pointer-provenance work is #332 (open, from #266) — an export-time out-of-allocation pointer check, which would have made this class of defect self-detecting. #606 does not mention it.
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
- Fits charter goals: SM103/SM120/SM121 preparation and GB10/DGX Spark are named targets; the change keeps native export validation intact rather than relaxing it, which matches AGENTS.md's "Reject weakened guarantees … Do not remove validation, suppress errors" (AGENTS.md:182-187).
- Also matches the charter's "Solve the right problem in the right place … smallest footprint in shared code": 23 lines of production code, no flags, no config, no per-model branch (charter "Keep the runtime small and model-agnostic" is untouched).
- Tension: "Bring real evidence … Bug fixes need to address the root cause" — the root cause is arguably that allocation discovery classifies any undeclared segment as an export error; #606 relocates the allocation instead. Whether that is the right layer is a judgement call the report should surface, not settle.
- Not in the restricted-authorship category (AGENTS.md:474-486): it is PyTorch/pool/export orchestration, not kernel or fusion design.
- AGENTS.md's cross-path rule ("inspect the shared components and equivalent paths in every supported recipe",
:500-503) is only partly met: single-GPU GB10, text-only, Qwen3.8, with multi-rank explicitly unmeasured (the description says so).
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):
- ignition/preparation/capture.py:52
_seed_warmup_workspaces(stream, device, pool=None); the_warmup_pools[index]lookup/creation moved insideif pool is None:(capture.py:67-70). - capture.py:118-122:
warmup_pool = warmup_storage.warmup_pool() if hasattr(warmup_storage, "warmup_pool") else None; passes it if non-None, else keeps the exact 2-arg call_seed_warmup_workspaces(warm, device). - ignition/preparation/core_storage.py:300-309
CoreStorage.warmup_pool(): lazily onetorch.cuda.MemPool(self._allocator.allocator()), cached onself._warmup_poolvia getattr (not declared in__init__, unlike_retention_poolat core_storage.py:73), addspool.idto_preparation_pools. Same shape asscratch_pool()(core_storage.py:294-298) andtransient()(:277-282). - Tests: tests/preparation/test_core_storage.py:83-105 (CPU, monkeypatched FakeMemPool; asserts reuse, allocator identity, id in _preparation_pools); tests/preparation/test_capture_cublas_workspace_cuda.py:123-173 (GPU-gated on FLARE_RUN_CUDA_TESTS=1; uses plain
torch.cuda.MemPool()+ SimpleNamespace withwarmup_pool=lambda: export_warmup).
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)
-
_preparation_poolsmembership is not just ownership bookkeeping:CoreStorage.unused_ranges()(ignition/preparation/core_storage.py:319-334) sweepstorch.cuda.memory_snapshotsegments whosesegment_pool_idis in_preparation_poolsand returns padding + inactive-block ranges.export_modelfeeds those into bothinactiveandzero_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. -
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.
-
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.
-
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.
-
The
hasattr(warmup_storage, "warmup_pool")duck-typing means any storage object that happens to definewarmup_poolchanges behaviour; no test covers a storage that hastransientbut notwarmup_poolin the export path other than pre-existing stubs (test_capture_rank_readiness.py:70 uses SimpleNamespace(transient=nullcontext) — the else branch).