Case file — PR #669 "Fall back to host-backed CUDA VMM when registered host memory lacks identity addressing"
Author kbenkhaled (CONTRIBUTOR) · open, "ready for review" · base main, head ea65cb2 (single commit) · 7 files, +417 / −71 · 0 comments, 0 reviews, no labels, no CI on head · opened 2026-12-01 22:54.
https://github.com/NVIDIA/hyperflare-inference/pull/669
Key findings
- It collides head-on with open PR #658 on the same five lines. Both rewrite the integrated SM87
(8, 7)default window inignition/preparation/core_storage.py:66-71, in opposite directions. #669 lowersDEVICE_BASE72 GiB → 48 GiB (0x12_0000_0000→0x0c_0000_0000) and keepsEXTERNAL_FLOORat 12 GiB (0x300000000), because the 8 GiB Orin Nano VMM ceiling is 96.56 GiB (0x18_23c0_0000). #658 (lukealonso, COLLABORATOR, opened ~5 h earlier the same afternoon) raisesEXTERNAL_FLOORto 36 GiB (0x900000000) and explicitly keepsDEVICE_BASE = 0x1200000000, stating "total 120 GiB inside the 128 GiB GA10B VMM window". Both also append tests attests/preparation/test_core_storage.py:83+. #658 carries a test assertingDEVICE_BASE == 0x1200000000, which #669 would break; landing both leaves only 12 GiB below the device window. Neither PR mentions the other. - It empirically contradicts merged #589 and leaves that code and docs stale. #589 (merged 2026-11-28) codified that host-NUMA VMM is unsupported "on Windows WDDM and integrated Tegra/GA10B GPUs" —
helios/src/cuda.rs:552-557(is_host_numa_unsupported(status 1|801)),selene/src/offload.rs:693-695,docs/prefix-cache-offload.md:588-590. #669 measures141 (HOST_NUMA_VMM) == 1on Orin Nano, and touches none of those three places. Two capability-detection idioms now coexist (attribute query at init vs. probe-the-call-and-fall-back). - Undeclared in the description but in the diff:
#[cfg(any(windows, test))] mod hostbecomespub mod host(helios/src/runtime_core/mod.rs:22), exposingpub unsafe host_numa_propertiesas new public runtime API; the device-granularity check is tightened fromgranule != 0togranule.is_power_of_two()for every platform (heliopause/src/allocator.rs:495-502);heliopausenow queries device attributes 99 and 91 unconditionally at init (allocator.rs:465-480);core_storage.py:103hard-indexeslayout["host_vmm"]with no native-ABI/version handshake, so a staleflare_heliopauseraisesKeyErrorrather than a version error;WindowsHostRegionis renamedHostVmmRegionwith no alias (core_storage.py:492). - A capability hole with no third fallback: a Linux device with
99 == 0or91 == 0and141 == 0now commits tohost_vmm(allocator.rs:511-518), reportshost_vmm=truein the snapshot (allocator.rs:863), and then fails hard — export raises "mapped core storage requires host-backed CUDA VMM" (core_storage.py:499-502) and Helios load raises the same (host.rs:115-116). Before the PR such a device exported and only failed at serve ("requires identical CPU and CUDA addresses",core_storage.py:461-462). The failure moves earlier, but themmap+cuMemHostRegisterpath is gone with no message about the missing 141. - All end-to-end evidence is hardware-local and self-reported; no CI ran. The replay path used for the Orin/Thor validation (
helios/tests/fixed_core_fixture.py:111→helios/src/runtime_core/event_tests.rs:14-53) is#[ignore]d and needsFLARE_EVENT_TEST_CORE, so CI cannot reproduce any of it. Suite counts (helios 1775 pass/6 template-401 failures; heliopause 228/1export::blobctime; flare 253; flare-cli 241; pytest 18 pass/1 skip) are unattached to any run. - Charter tension (fact, not verdict): the change adds hardcoded 8 GiB window, 1 GiB alignment, and 12/1 GiB
min_host_basethresholds (allocator.rs:386-392,526-530) with no config surface against "No magic defaults"; and it validates only SM87 + SM110 while the shared MappedHost path serves every target indocs/cli-design.md:6(SM87/103/110/120/121) — Windows WDDM, GB10/SM121, AGX Orin 64 GiB and discrete Linux GPUs are declared unrun, against the charter's "Supported matrix & compatibility" rule.
The change
Plain terms: mapped host buffers (offload/embedding mailboxes) need CPU and GPU to see the same virtual address. Linux got that from mmap + cuMemHostRegister + cuMemHostGetDevicePointer_v2 and then asserted gpu_ptr == cpu_ptr (helios/src/runtime_core/mod.rs:643-677, :709-722; Python mirror ignition/preparation/core_storage.py:432-476). Windows already used host-backed CUDA VMM (host-NUMA allocations reserved at chosen addresses); that code was #[cfg(windows)] only. #669 makes the Windows mechanism selectable on Linux by capability and retunes two address windows.
Five functional pieces (all as described, verified against the diff):
helios/src/runtime_core/driver.rs: named attribute constantsCU_DEVICE_ATTRIBUTE_{INTEGRATED=18, CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM=91, HOST_REGISTER_SUPPORTED=99, GPU_DIRECT_RDMA_SUPPORTED=116, HOST_NUMA_ID=134, HOST_NUMA_VMM=141}.helios/src/runtime_core/host.rs:use_host_vmm(windows, host_register_supported, can_use_host_pointer) = windows || !host_register_supported || !can_use_host_pointer(host.rs:12-18);host_numa_properties(&Driver, device) -> Result<Option<(AllocationProperties, usize)>>returningOk(None)whenHOST_NUMA_VMM == 0and rejecting non-power-of-two host granularity (host.rs:52-70+);allocate_hostreachable on Unix; unit test over all 8 attribute combinations (host.rs:202-221).helios/src/runtime_core/mod.rs:NativeResourcesgainshost_vmm;host_mappingsno longer#[cfg(windows)](mod.rs:120-127);initializequeries 99 and 91; host allocation gated onself.host_vmm && host_mappings.is_empty(); the three#[cfg(unix)]MappedHost blocks become#[cfg(unix)] if !self.host_vmm(mod.rs:645, :711, :1610); teardown loop unconditional.heliopause/src/allocator.rs:Arena.host_vmm;"host_vmm"added toflare_core_snapshot()(allocator.rs:863); newvmm_host_window()placing an 8 GiB per-rank host window aligned tomax(granule, 1 GiB)(allocator.rs:386-400), preferring just below the device window at or abovemin_host_base; probe usescuMemAddressReserve/cuMemAddressFreewith the free status checked (allocator.rs:539-554); gated on!cfg!(windows) && host_vmmso no speculative probes run on WDDM (allocator.rs:516-518).ignition/preparation/core_storage.py: SM87 defaults 48..96 GiB (core_storage.py:66-71);self._host_vmm = bool(layout["host_vmm"])(:103);HostVmmRegionverifies attribute 141 before allocating and raises when absent (:492-502); region dispatch isHostVmmRegion if self._host_vmm else HostRegioninstead ofos.name == "nt"(:356).
Size: 7 files — heliopause/src/allocator.rs +206/−8, helios/src/{driver,host,mod}.rs +128/−50, tests/preparation/test_core_storage.py +59, ignition/preparation/core_storage.py +13/−7, docs/runtime-core-design.md +11/−6. Total +417/−71.
Nothing the description says is missing from the code (8 GiB window, GiB alignment, full-span probe with error propagation, cuMemRelease status check, snapshot key all present). The undeclared items are in Key finding 3.
The why
The problem statement is self-authored: no linked issue, no maintainer request, no roadmap line names Orin. What exists:
- SM87 is an officially served target —
docs/cli-design.md:6lists SM87 alongside SM103/SM110/SM120/SM121. - An SM87-only address-layout branch already existed in
core_storage.pybefore this PR, so Orin export was already an accepted goal. - Merged #589 (2026-11-28) already patched Orin around a host-memory limitation, and the author's own merged #592 added the sm110/Thor identifiers that #669's second validation target depends on. Orin support has been accumulating in small fixes since ~2026-11-28 rather than tracking one umbrella request.
Who it blocks, by feature — each uses MappedHost storage and therefore cannot export or replay on Orin today: offloaded embedding/n-gram mailboxes (helios/tests/engram_core_fixture.py:133 (not opened), #566, and the author's own #664), persistent-worker stop flag and metrics counters (#431, #507), and the fixed-core replay fixture itself (helios/tests/fixed_core_fixture.py:111).
Two secondary defects, also unlinked: the pre-PR SM87 window 72..120 GiB exceeds the 8 GiB Orin Nano VMM ceiling 0x18_23c0_0000 (96.56 GiB), and the 12 TiB HOST_BASE (core_storage.py:37) lies outside Orin's VMM aperture.
Related work
- #658 (open, lukealonso) — direct conflict, same lines; see Key finding 1.
- #589 (merged 2026-11-28, lukealonso, +994/−133) — the previous Orin host-memory fix, and it asserts the opposite about
HOST_NUMA_VMMon GA10B; see Key finding 2. #669's attribute-at-init detection differs from #589's "try the call, treat status 1/801 as unsupported" (helios/src/cuda.rs:552-557). - #664 (open, same author, opened ~3 h earlier) — single-plane BF16 + identity-indexed offloaded embedding table; the mailbox feature that benefits from #669. Same author, no Discord handle given, two "Changes Requested" autobot reviews, blocked on unrecorded owner approval + CI.
- #592 (merged 2026-11-29, same author) — added sm110/Thor identifiers; #669's Thor SM110 validation builds directly on it.
- #297 (2026-11-14, gmbuell) and #293 — introduced the MappedHost seam #669 reworks: address-width check, explicit
device_window, and the original WDDM-onlyWindowsHostRegion. #430/#431/#507/#566 are the MappedHost consumers. #669 is therefore the third rework of this seam in two weeks and the first to make it non-Windows. - #606, #622, #647, #497, #625 (listed in the orientation packet as file-overlapping) — none overlaps #669's actual hunks beyond shared files; #647 last touched
tests/preparation/test_core_storage.pyon main, which is where #669 and #658 both append. #616 (closed issue) concerns host prefix-cache sizing on fragmented memory — adjacent topic, no direct link. - No PR supersedes #669 and nothing indicates #669 was requested by a maintainer.
Recent activity
All four touched directories churned heavily in the four days before #669, mostly by maintainers: heliopause/src (#628, #652, #646, #647, #620, #586, #618, #1fbd4210), helios/src (#666, #657, #628, #656, #638, #625, #645, #646), tests/preparation + ignition/preparation (#647, #641, #624, #618, #581, #608). #669 builds on top of that state but only modifies allocator init/snapshot/tests, the runtime-core host module, and the SM87 defaults — it does not reverse any of those commits. The one live conflict is with concurrent, still-open #658 (Key finding 1). #625 ("Avoid THP compaction stalls in eos::map_host") and #656 are host-memory adjacent but different files.
People
- kbenkhaled (CONTRIBUTOR): 1 merged PR (#592, sm110/Thor identifiers, 2026-11-29, docs/ignition/cli/tests), 2 open (#664, #669). Prior merged work is Python/ignition-side; #669 is their first Rust/CUDA-VMM change in this repo. No Discord handle on either open PR, unlike repo regulars (e.g. #658 gives "lukealonso").
- Area regulars (commits in last 180 days): Luke Alonso dominates all four touched areas (heliopause 63, helios 235, tests/preparation 207, ignition/preparation 160), with Martin Vit, yatesdr, jasonc. Luke Alonso authored #589 and #658 — the two items #669 most interacts with — and has not engaged with #669.
- No maintainer or priority contributor has reviewed or commented on #669.
Community
Zero comments, zero reviews, zero reactions, no labels, no autobot intake or case-file comment (contrast #664 and #658, both of which got the flare-autobot intake note within minutes and a full review within ~1 h — #669 may simply be younger than the auto-review window). Comparable open PRs carry labels such as triage:review, area:memory, area:preparation (#658) and area:engram, enhancement, performance (#664); #669 has none. No review instructions or prompt-injection attempts were found in #669's body or in the related PR bodies read.
Project fit (charter facts)
- Lines up: charter "What gets merged" includes PRs addressing "a reproducible bug … or a measured performance/memory issue" — #669 cites a reproducible Orin failure and a measured 96.56 GiB ceiling. Its capability-based form (attributes 99/91, no hardware-name check) matches the "smallest footprint in shared code / no per-model special cases" ideal, and it adds no model branches.
- Does not line up: (a) "Supported matrix & compatibility — check interactions across every supported model… hardware target named in the docs": SM103/SM120/SM121, Windows, AGX Orin 64 GiB and discrete Linux GPUs are all declared unrun, while the MappedHost path is shared by all of them; (b) "Be explicit and pin everything. No magic defaults": hardcoded 8 GiB / 1 GiB / 12 GiB / 1 GiB constants in
allocator.rs:386-392and:526-530with no flag; (c) non-goals distance themselves from broad hardware support, so a narrowly Jetson-tuned default sits near that line; (d) no maintainer request or issue is referenced. - Docs:
docs/runtime-core-design.mdis updated (Linux host-VMM fallback at :108-110; 48 GiB SM87 device window and 12 GiB floor at :93 and :119). Left stale:docs/same-process-tp.md:38-45still says host ranges span 1 TiB at0x0c00_0000_0000/0x2000_0000_0000;docs/windows.md:212-217still frames host-VMM as Windows-only ("Linux registers host pages… Windows uses host-backed CUDA VMM");docs/prefix-cache-offload.md:588-590still says GA10B lacks HOST_NUMA VMM;helios/src/cuda.rs:553-554andselene/src/offload.rs:693-695repeat that claim in code comments.
Claims and evidence
| Claim in the PR | Evidence in the PR | Independently checkable in tree? |
|---|---|---|
Orin Nano 8 GiB attributes 18=1, 91=0, 99=1, 134=0, 141=1; max 2 MiB VMM end 0x18_23c0_0000 |
Author's hardware measurement; no device query log attached | No |
CoreStorage → host_vmm=True, DEVICE_BASE=0xc00000000, HOST_BASE=0xa00000000, 6-allocation core exported, native replay + byte-exact output + clean teardown in 1.04 s |
Author's run via fixed_core_fixture.py:111 → event_tests.rs:14-53 |
No — that test is #[ignore]d and needs FLARE_EVENT_TEST_CORE |
Thor SM110 keeps host_vmm=False, DEVICE_BASE=0x80000000000, export + replay + teardown in 0.37 s |
Author's run | No |
| Suite counts (helios 1775/6, heliopause 228/1, flare 253, flare-cli 241, pytest 18 pass/1 skip) | Self-reported with failure explanations | No CI on head ea65cb2 |
use_host_vmm logic correct |
Verified: exact expression at host.rs:12-18 plus 8-combination unit test host.rs:202-221 | Yes |
vmm_host_window handles narrow apertures, floor collision, GiB alignment, multi-rank, invalid granularity, probe-cleanup errors |
Verified: one parameterised test (allocator.rs:1589-1638) with in-test closures covering Nano 96.56 GiB cap, AGX 64 GiB cap, floor collision, world=2, default-fit, granules 0 and 3 MiB, unreservable, probe-cleanup error |
Yes |
HostVmmRegion dispatch, overflow non-mutation, 141 rejection |
Verified: tests/preparation/test_core_storage.py:83-139 |
Yes |
| — | Untested: the !cfg!(windows) branch condition, min_host_base selection (allocator.rs:526-530), snapshot → CoreStorage propagation of host_vmm, and helios's three if !self.host_vmm MappedHost branches (mod.rs:645, :711, :1610) |
Absent |
Reach
- Users: Jetson Orin (GA10B/SM87, JetPack 6 / CUDA 12.6) owners exporting or serving any model with a host mailbox; also anyone on a Linux GPU that lacks 99 or 91.
- Defaults changed: every SM87 export moves from 72..120 GiB to 48..96 GiB regardless of whether the model uses MappedHost; on any Linux device lacking 99/91, cores gain a new 8 GiB per-rank host window recorded into the MappedHost table = 40..48 GiB when reservable, else after the device windows (
allocator.rs:386-400,:526-530). The PR states both Orin Nano 8 GiB and AGX Orin 64 GiB get 40..48 GiB, so cores interchange between boards (asserted by the allocator test). - Compatibility: no legacy Orin core population can break, because
HostRegionpreviously raised on export (core_storage.py:461-462), so Orin cores could not be produced. Windows behaviour is intended unchanged:host_vmmis true by construction there but the new probe is skipped by!cfg!(windows)and Windows still useswindow_host_layout→HOST_BASE(allocator.rs:299-303). - Deployment coupling:
flare_heliopauseandignitionmust be rebuilt together —layout["host_vmm"]and theHostVmmRegionname come only from this PR; no ABI/version check guards it. - Dependencies: none changed (no Cargo/pyproject edits). New public Rust surface
helios::runtime_core::host. - Not exercised: Windows WDDM build/serve, GB10 (SM121), AGX Orin 64 GiB, discrete Linux GPUs, and RoCE over host-VMM buffers — RoCE matters because MappedHost buffers feed shared/peer mailboxes in TP (#664 territory).
Process
Open and marked ready for review; single commit ea65cb27; no CI checks on the head commit; no reviews, no comments, no labels; hours old at the time of this case file, with two competing same-area PRs (#658 same afternoon, #664 same evening, different authors) in flight. No linked issue and no maintainer ack.
Open questions / not found
- Which of #669 and #658 reflects the real GA10B aperture? Both cite live SM87 runs; #658 says 72..120 GiB is inside a "128 GiB GA10B VMM window", #669 measures a 96.56 GiB ceiling on 8 GiB Orin Nano. Likely board-dependent (8 GiB Nano vs 64 GiB AGX), which neither PR states explicitly for the other's board — the reconciling fact was not found in the repo.
- No device-attribute log, exported core, or transcript backs the Orin/Thor runs.
- Whether any downstream recipe/test imports
WindowsHostRegionoutside the repo — the rename has no alias; only in-repo reference iscore_storage.py:356. - Whether a Linux device with 99/91 == 0 and 141 == 0 exists in practice (Key finding 4) was not established; no hardware matrix entry covers it.
- No issue, roadmap item, or maintainer request behind the change could be found; no autobot intake/review exists for #669 yet.