Opened by a workflow run, Dec 1, 2026 5:55 PM EST. decide malicious: all_clear (100%): No malicious content found
explore
Author: kbenkhaled (CONTRIBUTOR; 1 merged PR #592, 2 open; no Discord handle given)
Motivation: Mapped host buffers (offload/embedding mailboxes) need the CPU and GPU to share one virtual address. On Jetson Orin the Tegra driver cannot do that with cuMemHostRegister, so export and replay fail; the fix reuses the Windows host-backed CUDA VMM path on Linux, chosen by device capability rather than OS.
Scale: +417 / −71 lines in 7 files
Proposal:
use_host_vmm+ sharedhost_numa_properties; host allocation/host-NUMA VMM un-gated from Windows on Unix (helios/src/runtime_core/{driver,host,mod}.rs)NativeResources/Arenalearnhost_vmm; init queries attributes 99 and 91; MappedHost register path skipped when VMM is used- New narrow-aperture
vmm_host_window(): 8 GiB per-rank host window aligned tomax(granule, 1 GiB), probed withcuMemAddressReserve/cuMemAddressFree "host_vmm"exposed inflare_core_snapshot();WindowsHostRegion→HostVmmRegionverifying attribute 141- SM87 default device window lowered 72..120 GiB → 48..96 GiB; docs and tests added Touches:
ignition/preparation/core_storage.py(SM87 defaults, region dispatch — collides with #658)heliopause/src/allocator.rs(host address layout, init/snapshot)helios/src/runtime_core/{mod,host,driver}.rs(capability detection, mapping/teardown, new public module) Related items:- #658 fix(ignition): raise GA10B external floor… (open): same lines, opposite direction — raises floor to 36 GiB, keeps 72 GiB DEVICE_BASE
- #589 Fix CUDA 12 batched copies… (merged): documents GA10B as lacking HOST_NUMA VMM, which #669 measures as present; code/docs left stale
- #664 single-plane BF16 / identity-indexed offloaded embedding (open): same author, the mailbox feature #669 unblocks
- #592 Add sm110/thor identifiers (merged): same author; supplies the Thor SM110 target #669 validates on
- #297 helios: address-width check + WDDM host region (merged): introduced the MappedHost seam #669 now extends to Linux
Link: https://github.com/NVIDIA/hyperflare-inference/pull/669
Autobot comments: Undeclared in the description:
mod hostbecomespub mod host(new publicunsafeAPI), the device-granule check tightens tois_power_of_two()for all platforms,layout["host_vmm"]is hard-indexed with no native version handshake (staleflare_heliopause→ KeyError), andWindowsHostRegionis renamed without an alias. A Linux device with 99/91 == 0 and HOST_NUMA_VMM == 0 now fails export and load outright with no third fallback. All end-to-end evidence (Orin Nano 1.04 s, Thor 0.37 s, suite counts) is hardware-local and self-reported; no CI ran, and the replay test it used is#[ignore]d. Docssame-process-tp.md,windows.mdandprefix-cache-offload.mdare left stale.
Value Proposition
Value Proposition — PR #669 "Fall back to host-backed CUDA VMM when registered host memory lacks identity addressing"
Charter alignment. Good on intent, weaker on execution. The problem is concrete and reproducible: on 8 GiB Orin Nano the VMM ceiling is 0x18_23c0_0000 (96.56 GiB), so the 72–120 GiB SM87 default window and the 12 TiB HOST_BASE cannot be reserved. SM87 is an officially served target (docs/cli-design.md:6) and already had an SM87-only layout branch before this PR, so this falls inside "What gets merged" (reproducible bug / measured memory issue). The mechanism is capability-based — attributes 99/91, no hardware-name checks — matching "smallest footprint in shared code / no per-model special cases." Against that: no linked issue, roadmap line, or maintainer ack; hardcoded 8 GiB window, 1 GiB alignment and 12/1 GiB thresholds (allocator.rs:386-392, :526-530) bump against "No magic defaults"; and only SM87 + SM110 were exercised, though the MappedHost path is shared by SM103/120/121, Windows, and discrete Linux GPUs.
Novelty & status. Neither obsolete nor superseded: nothing on main fixes this, and #658 only retunes the address floor without delivering the host-VMM fallback. But #658 collides head-on — both rewrite the same five lines in core_storage.py:66-71 in opposite directions, #658 carries a test asserting DEVICE_BASE == 0x1200000000 that #669 breaks, and the two cite contradictory GA10B apertures (plausibly 8 GiB Nano vs 64 GiB AGX) without reconciling. It also contradicts merged #589 while leaving helios/src/cuda.rs:552-557, selene/src/offload.rs:693-695 and docs/prefix-cache-offload.md:588-590 still asserting GA10B lacks HOST_NUMA_VMM — two detection idioms now coexist.
Value vs cost. Beneficiaries are real: Orin owners and the mailbox features that cannot export there today (#664, #431/#507/#566). Evidence is the weak link — hardware-local, self-reported, reproducible only through an #[ignore]d fixture needing FLARE_EVENT_TEST_CORE; no CI on head, no reviews. The diff also carries undeclared surface (pub mod host, public host_numa_properties, a platform-wide power-of-two granularity tightening, an unaliased WindowsHostRegion rename), a layout["host_vmm"] hard-index that raises KeyError on a stale flare_heliopause, and a capability hole where 99/91 == 0 with 141 == 0 commits to host_vmm and hard-fails without naming the missing 141. This is the third rework of the MappedHost seam in two weeks, from a contributor's first Rust/CUDA-VMM change, with the area owner (author of #589 and #658) uninvolved.
Verdict: Worth it with changes. Required: reconcile with #658 into one address-layout change stating board-specific apertures; unify with #589's detection and update its docs/comments; keep or explicitly diagnose the no-141 case; guard the ABI change (version handshake or alias); name the magic constants; and provide CI-reproducible evidence covering the currently untested branches.
Full report Decide Value: yes (99%): This change is worth reviewing: it provides value to the project in line with its charter.
Classify intake
Selected: triage:review, performance, enhancement, area:memory, area:preparation
Threshold: 65%
Triage
- [✓]
triage:review: 98.8% -
triage:validation: 0.6% -
triage:design-review: 0.5% -
triage:investigate: 0.0% -
triage:integration: 0.0% -
none: 0.0% -
triage:partial: 0.0% -
triage:superseded: 0.0% -
triage:verify-for-closure: 0.0%
Priority
-
none: 82.2% -
priority:P2: 12.6% -
priority:P1: 5.3%
Type
- [✓]
performance: 81.8% - [✓]
enhancement: 77.7% -
bug: 56.2% -
duplicate: 50.0% -
community: 43.8% -
documentation: 0.0%
Area
- [✓]
area:memory: 73.1% - [✓]
area:preparation: 67.9% -
area:engram: 29.4% -
area:rocenante: 3.3% -
area:selene: 2.3% -
area:caching: 1.0% -
area:packaging: 0.7% -
area:kernels: 0.5% -
area:api: 0.4% -
area:scheduling: 0.2% -
area:orbit: 0.1%
Model
-
model:inkling-small: 1.4% -
model:qwen3.8-flash-next: 1.2% -
model:nemotron-3.5-bolt: 1.1% -
model:deepseek-v4: 0.2% -
model:mimo-v2.6: 0.2% -
model:muse-glimmer: 0.1% -
model:qwen3.8-27b: 0.1% -
model:gemma4: 0.1% -
model:glm-5.3: 0.1% -
model:deepseek-v4.1: 0.0% -
model:kimi-k3.1: 0.0%
Apply Labels (Intake)
Applied: +triage:review, +performance, +enhancement, +area:memory, +area:preparation
Subtraction and simplicity
Subtraction/simplicity review of PR #669 (7 files, +417/−71). Verdict: no new flags, env switches, config knobs or speculative extension points were added, and the new named CUDA attribute constants are a net win — but roughly 120 of the +417 lines are removable duplication, one dead fallback branch, and unreachable re-validation, and the capability decision is spread over four places where one would do.
-
host::use_host_vmmshould own its own attribute queries (high). It takes(windows, host_register_supported, can_use_host_pointer), and both callers re-implement the same two query blocks to feed it:helios/src/runtime_core/mod.rs:364-386(~23 lines) andheliopause/src/allocator.rs:465-480plus the six-element tuple at:448-455. Folding intounsafe fn use_host_vmm(driver, device) -> Result<bool>in host.rs (which already ownshost_numa_properties) removes ~45 lines and stops passingcfg!(windows)through a library API. Also deletehelios/src/runtime_core/host.rs:202-221, which asserts the function equals a copy of its own body plus four constant definitions. -
Delete the
HOST_NUMA_VMM == 0fallback rather than re-check it in Python (high).heliopause/src/allocator.rs:518-561has two identicalelsearms; the inner one keepshost_vmm = truewith a plain host window when 141 is absent, deferring failure to export. Erroring there makes the per-region re-query atignition/preparation/core_storage.py:499-502dead — delete it withtests/preparation/test_core_storage.py:130-139, restoringimport torch/tensor_from_pointerto the top of__init__besideHostRegion.__init__(:438-439). -
vmm_host_windowis a parallel copy ofwindow_host_layout's placement logic (medium). The "round up past the device span" arithmetic atallocator.rs:405-413duplicates:320-347; two functions and two tests assert one contract. Extendingwindow_host_layoutwith a reserve-probe callback and a low floor removes ~57 lines plus the 8-argument call site at:531-555and its#[allow(clippy::too_many_arguments)]. -
Unreachable re-validation and a duplicated floor constant (medium).
allocator.rs:377-381(power-of-two granule) cannot fire afterhost.rs:91-95andallocator.rs:495-502;:521-525and:540-542are redundantusizeguards;:526-530restates ignition'sEXTERNAL_FLOOR(core_storage.py:42,:69) and infers which value applies from a hardcodedbase < 0x40_0000_0000. -
Prose budget went to the wrong file (low).
docs/runtime-core-design.md:104-113gained attribute-level implementation detail whiledocs/windows.md:212-217,docs/prefix-cache-offload.md:588-590,helios/src/cuda.rs:552-557andselene/src/offload.rs:693-695still say host-VMM is Windows/WDDM-only and that GA10B lacks it.
Open questions: whether the quarterly GA10B aperture in #658 conflicts with the 96.56 GiB measurement here; whether any out-of-tree code imports WindowsHostRegion (rename at core_storage.py:492 kept no alias); whether the pub mod host widening (helios/src/runtime_core/mod.rs:22) is intended as permanent public API.
Correctness and contracts
Review of PR #669 (host-backed CUDA VMM fallback on Linux) for correctness, contracts and system-level consequences. The mechanism is coherent and the two support module changes (use_host_vmm, host_numa_properties) are correct, but the placement of the new host-VMM window is decided, probed and then discarded at allocator-init time, which produces a new total-export-outage mode and a TOCTOU hazard on exactly the narrow apertures the PR targets.
Findings, most important first:
- Blocker —
vmm_host_window'sErris propagated with?out offlare_core_initialize_window, which every export runs (ignition/preparation/core_storage.py:96-97), so "no reservable … range" now aborts all exports on a 99/91==0 device, including models with no MappedHost (heliopause/src/allocator.rs:516-561,415-417). - Major — the probe reserves and immediately frees the chosen range (
allocator.rs:544-553); only the device window is held. The 40..48 GiB host window sits above the sealed floor (12 GiB) and can be taken by context/cuBLAS allocations beforeHostVmmRegionre-reserves it (core_storage.py:489-520), giving intermittent hard export failures. - Major — new unconditional
cuDeviceGetAttribute(99/91)viadriver.check(...)?turn an unrecognized attribute into a hard init/load failure, on every platform (helios/src/runtime_core/mod.rs:364-389,allocator.rshunk@@ -384,15 +445,46 @@). - Major — two disagreeing capability gates: the snapshot reports
host_vmm: truefrom 99/91 alone whileHostVmmRegionrejects on141 == 0(core_storage.py:499-502), so a 141-less Linux device fails with "requires host-backed CUDA VMM" and loses the old registration path with no message naming 141. - Major — undeclared contract changes: device granularity tightened from
!= 0tois_power_of_two()on all platforms (allocator.rs:497),mod hostwidened topub mod hostexposingpub unsafe host_numa_properties(mod.rs:23,host.rs:57). - Major — hard dependency on a new snapshot key (
layout["host_vmm"],core_storage.py:103, inconsistent with the neighbouring.get) plus theWindowsHostRegion→HostVmmRegionrename with no alias (core_storage.py:492). - Major — the host backing mode is re-derived from local attributes at load (
mod.rs:364-389) and never recorded in the core, yet the allocator test asserts cross-board interchange; no test covers loading a core produced in the other mode. - Minor–Major — the probe flattens every
cuMemAddressReservestatus into "not reservable" (allocator.rs:544-553), so the final error has no cause (charter #397). Also: magic 8 GiB / 1 GiB / 12 GiB constants with the floor duplicated across Python and Rust (allocator.rs:526-530vscore_storage.py:69) — which already conflicts with #658's 36 GiB floor; and #589's "no HOST_NUMA_VMM on GA10B" claims left stale.
Verified sound: the if !self.host_vmm MappedHost rework in helios, the #[cfg(unix)]-free teardown, and the cuMemRelease status check.
Open questions: which board #658's 72..120 GiB measurement came from; whether a 99/91==0 and 141==0 Linux device exists; and no CI/device log backs the Orin/Thor runs.
Final review
Recommendation: Changes Requested
The core mechanism—reusing the existing host-backed CUDA VMM (HOST_NUMA) path on Linux whenever a device lacks HOST_REGISTER_SUPPORTED (99) or CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM (91), while keeping capable Linux GPUs on mmap + cuMemHostRegister and Windows WDDM off speculative probes—is clean, capability-driven, and memory-safe in helios/src/runtime_core/{host,mod}.rs. However, four verified issues need resolution before merging: a head-on GA10B address-layout conflict with open PR #658 compounded by a duplicated EXTERNAL_FLOOR heuristic in Rust, a TOCTOU gap where the probed host VMM range is freed inside the narrow unsealed external allocation band, init-time probe failure propagation that swallows CUDA error statuses and breaks non-MappedHost exports on tight windows, and stale contradictory docs/comments across the repo. No CI has run on ea65cb2 yet.
Merge Risk
Level: Medium
- Shared MappedHost load/init seams across all targets: Modifies
heliopause/src/allocator.rs,helios/src/runtime_core/{driver,host,mod}.rs, andignition/preparation/core_storage.py, which run on every export and native core load across SM87/103/110/120/121 and Windows WDDM. Linux GPUs with99==1 && 91==1and Windows WDDM (!cfg!(windows)) preserve their existing paths, keeping steady-state regression risk bounded, but no CI has verified Windows or non-Orin/Thor targets onea65cb2. - Every SM87 export moves address windows and collides with #658: Lowering integrated SM87
DEVICE_BASEfrom0x12_0000_0000(72 GiB) to0x0c_0000_0000(48 GiB) shifts all SM87 exports (even models withoutMappedHost) and directly conflicts with open PR #658's GA10B cuRAND floor fix (EXTERNAL_FLOOR = 0x9_0000_0000,DEVICE_BASE = 0x12_0000_0000). - Narrow-aperture VA race during preparation: Freeing the probed
[40 GiB, 48 GiB)host VMM range betweenCoreStorage.__init__andhost_allocate()leaves it exposed to intervening CUDA/cuBLAS external allocations in[EXTERNAL_FLOOR, DEVICE_BASE).
Walkthrough
helios/src/runtime_core/driver.rs:14-19: Defines namedCU_DEVICE_ATTRIBUTE_*constants (18,91,99,116,134,141).helios/src/runtime_core/host.rs:12-18,57-174: Adds shareduse_host_vmmandhost_numa_properties(validatingHOST_NUMA_VMMand power-of-two host granularity), ungatesallocate_hoston Unix, and checkscuMemReleasestatus after recording each host mapping.helios/src/runtime_core/mod.rs:22,123-128,364-386,564-566,645,711,1610,1618-1620: Exportspub mod host(consumed by sibling crateheliopause), queries attributes 99/91 inNativeResources::initialize, routesMappedHostsetup/teardown byself.host_vmm, and unconditionally drainshost_mappingsin Phase 1 teardown.heliopause/src/allocator.rs:195,367-418,448-589,863,1589-1637: Computeshost_vmm, exposes"host_vmm"inflare_core_snapshot(), tightens device granularity validation tois_power_of_two(), addsvmm_host_window()to probe a GiB-aligned 8 GiB/rank host range on non-Windowshost_vmmdevices, and adds unit coverage forvmm_host_window.ignition/preparation/core_storage.py:66-71,103,356,492-505&tests/preparation/test_core_storage.py:83-139: Lowers SM87DEVICE_BASEto0x0c00000000(48..96 GiB), readsself._host_vmmfromlayout["host_vmm"], renamesWindowsHostRegiontoHostVmmRegionwith an explicitHOST_NUMA_VMM(141) guard, and adds unit tests for region dispatch, overflow cleanup, and 141 rejection.docs/runtime-core-design.md:92-121: Documents the Linux host-VMM fallback, narrow-aperture 8 GiB host range, and SM8748..96 GiB/12 GiBdefaults.
Pre-merge Checks
- [PASS] Security / malicious screen: No untrusted external inputs, secret exposure, suspicious native/FFI behavior, or prompt-injection attempts in PR diff or metadata.
- [WARN] Charter & value fit: Capability-based reuse of host-backed CUDA VMM on SM87 (a documented target in
docs/cli-design.md:6) fits the charter well, with zero per-model branches; however,allocator.rs:526-530duplicates Python'sEXTERNAL_FLOORvia a magic address heuristic, probe errors are swallowed without root-cause status (allocator.rs:544-553), and non-Orin/Thor targets in the supported matrix remain unverified. - [WARN] Related / duplicate / conflict check: Head-on conflict with open PR #658 on
ignition/preparation/core_storage.py:66-71andtests/preparation/test_core_storage.py:83+, plus stale statements left inhelios/src/cuda.rs,selene/src/offload.rs, anddocs/from merged #589 and earlier Windows docs. - [WARN] Tests & verification evidence: Unit tests in
host.rs,allocator.rs, andtest_core_storage.pyare isolated (no global state leaks), but no CI ran onea65cb2; end-to-end Orin Nano/Thor evidence is self-reported via the#[ignore]dfixed_core_fixture.py(not opened) ->event_tests.rsfixture,test_host_allocate_selects_region_by_host_vmmbypassesCoreStorage.__init__via__new__, and Windows WDDM, AGX Orin 64 GiB, SM120/SM121, and RoCE over host-VMM were not exercised.
Blockers
None.
Should Fix
-
Reconcile the GA10B address layout with open PR #658 and eliminate the duplicated
EXTERNAL_FLOORheuristic (ignition/preparation/core_storage.py:66-71,heliopause/src/allocator.rs:526-530):core_storage.py:66-71keepsEXTERNAL_FLOOR = 0x300000000(12 GiB) and lowersDEVICE_BASEto0x0c00000000(48 GiB,[48 GiB, 96 GiB)). Open PR #658 modifies the exact same lines to raiseEXTERNAL_FLOORto0x900000000(36 GiB) because staticcuRANDprecalc_xorwow_offset_matrixtables contain 64-bit patterns in[0x3_0000_0000, 0x3_0300_0000]that trigger false-positive export pointer matches, while keepingDEVICE_BASE = 0x1200000000(note: both measurements are consistent—64 GiB AGX Orin has a 128 GiB VMM ceiling and exported cores only reserve used GiB-aligned spans, whereas exporting directly on 8 GiB Orin Nano reserves the full 48 GiBRESERVATION_BYTESand hits the 96.56 GiB cap).- Independently,
heliopause/src/allocator.rs:526-530duplicates Python'sEXTERNAL_FLOORvia an address heuristic (if integrated != 0 && base < 0x40_0000_0000 { 0x3_0000_0000 } else { 0x40_0000_0000 }). OnceEXTERNAL_FLOORmoves (e.g., to 36 GiB per #658), Rust silently uses the stale 12 GiB floor and can placeHOST_BASEinsideseal_low_window()'s sealed range (e.g., forworld >= 2,before = 32 GiB < 36 GiB), and even forworld == 1only 4 GiB ([36 GiB, 40 GiB)) remains for external library allocations. - Fix: Coordinate a single GA10B window layout with #658 (keeping
EXTERNAL_FLOORclear of cuRAND's[0x3_0000_0000, 0x3_0300_0000]while fitting direct export inside Orin Nano's 96.56 GiB VMM ceiling), and passself.EXTERNAL_FLOORexplicitly fromCoreStorageintoflare_core_initialize_windowasmin_host_baserather than hardcoding a second copy in Rust.
-
Hold the probed host VMM range instead of freeing it before
host_allocate()(heliopause/src/allocator.rs:543-553,ignition/preparation/core_storage.py:109-110, 513-518):flare_core_initialize_windowprobes[40 GiB, 48 GiB)withcuMemAddressReserveand immediately releases it withcuMemAddressFree(allocator.rs:544-550). Immediately afterward,CoreStorage._reserve_low_window()(core_storage.py:109-110) seals only[4 GiB, EXTERNAL_FLOOR), leaving[EXTERNAL_FLOOR, DEVICE_BASE)open for cuBLAS handles, PyTorch non-pool allocations, and CUDA driver storage.HostVmmRegion.__init__(core_storage.py:513-518) only re-reservesHOST_BASElater whenhost_allocate()runs (e.g.,ignition/preparation/collectives.py:77(not opened) or mailbox setup). On a narrow 96.56 GiB aperture, any intervening external CUDA allocation landing in[40 GiB, 48 GiB)turns export into a load-order-dependent"cannot reserve mapped host CUDA address"failure.- Fix: Reserve the selected host VA span once during initialization and keep it held, having
HostVmmRegionmap/unmap physicalHOST_NUMAhandles directly inside that pre-reserved range without callingcuMemAddressReserve/cuMemAddressFree(mirroringDeviceRegionatignition/preparation/core_storage.py:608-655), or reserve/protect the span before external allocations run.
-
Do not fail allocator init on host-VMM probe failure for non-
MappedHostexports, and preserve the failing CUDA status (heliopause/src/allocator.rs:415-417, 518-555):vmm_host_window(...)propagatesErrout offlare_core_initialize_window(allocator.rs:555), even though most models never callhost_allocate(). Noticeallocator.rs:556-558already falls back to(default_host_base, default_host_extent)whenHOST_NUMA_VMM == 0so non-MappedHostmodels can still export, whereas whenHOST_NUMA_VMM == 1, a tight customdevice_windowor multi-rank layout where no 8 GiB host slice fits aborts export before model loading even begins.- At
allocator.rs:544-553, every non-zerocuMemAddressReservestatus (e.g.,CUDA_ERROR_INVALID_CONTEXT,CUDA_ERROR_OUT_OF_MEMORY,CUDA_ERROR_NOT_SUPPORTED) is flattened intoOk(false), andvmm_host_windowreturns"no reservable CUDA VMM address range for mapped host storage"with no CUDA error code or probed ranges. - Fix: Record the last non-zero CUDA status and attempted ranges in the failure diagnostic, and either defer host-VMM range placement/reservation until the first
host_allocate()call or keep initialization non-fatal when noMappedHoststorage is allocated (surfacing the recorded error ifhost_allocate()is subsequently invoked).
-
Update stale docs and comments that now contradict the new Linux host-VMM path:
docs/windows.md:212-217still states that "Linux registers host pages for mapped graph storage. Windows uses host-backed CUDA VMM…", contradictingdocs/runtime-core-design.md:107-110.docs/same-process-tp.md:38-45still states host ranges always span 1 TiB at0x0c00_0000_0000/0x2000_0000_0000.helios/src/cuda.rs:552-554,selene/src/offload.rs:693-695, anddocs/prefix-cache-offload.md:588-590still assert thatHOST_NUMAVMM is unsupported on "Windows WDDM and integrated Tegra/GA10B GPUs", which this PR empirically disproves on JetPack 6 / CUDA 12.6 GA10B (and Windows WDDM already usesHOST_NUMAVMM forHostVmmRegion).- Fix: Update these five sites to match the capability-based behavior (
HOST_NUMAVMM support depends on driver/device capability rather than being categorically absent on GA10B/WDDM, and Linux can fall back to host-VMM and narrower host windows).
Subtract / Simplify
- Fold the duplicated
HOST_REGISTER_SUPPORTED/CAN_USE_HOST_POINTER_FOR_REGISTERED_MEMqueries intohost::use_host_vmm(helios/src/runtime_core/host.rs:12-18, 202-221,helios/src/runtime_core/mod.rs:364-386,heliopause/src/allocator.rs:448-480, 511-515):- Both
NativeResources::initialize(mod.rs:364-386) andflare_core_initialize_window(allocator.rs:465-480) duplicate the identical ~20-line pair ofcuDeviceGetAttributecalls solely to feed booleans +cfg!(windows)intohost::use_host_vmm. - Change
use_host_vmmtopub unsafe fn use_host_vmm(driver: &super::driver::Driver, device: i32) -> Result<bool>(matching siblinghost_numa_properties), removing ~40 lines of duplicated FFI plumbing and shrinking theallocator.rs:448-455init tuple back from 6 variables to 4. Also drop the tautological boolean loop inhost.rs:209-219(which only comparesuse_host_vmmagainst a literal copy of its own 1-line body).
- Both
- Delete unreachable granularity re-validation and redundant
usizeconversion inheliopause/src/allocator.rs:366-381, 521-525, 1633-1634:vmm_host_window'sif !granule.is_power_of_two()guard (allocator.rs:377-381) cannot fire from its production caller becausegranuleis already validated withis_power_of_two()atallocator.rs:497andhost_granularityis already validated withis_power_of_two()athelios/src/runtime_core/host.rs:91-95(making the two assertions atallocator.rs:1633-1634dead-input tests).host_granule(allocator.rs:520) isgranule.max(host_granularity as u64)where both inputs came fromusize, sousize::try_from(host_granule)(allocator.rs:521-525) is redundant. Grouping the device/default window parameters into a small struct also removes#[allow(clippy::too_many_arguments)](allocator.rs:366).
Nits
ignition/preparation/core_storage.py:103:layout["host_vmm"]hard-indexes a newly added snapshot key right abovelayout.get("host_extent", ...)on line 105; if a developer runs updated Python against a staleflare_heliopausebuild, aKeyErroris raised mid-init. Raising a clearRuntimeErrormentioning aflare_heliopauserebuild when"host_vmm"is missing is friendlier.ignition/preparation/core_storage.py:501-502andhelios/src/runtime_core/host.rs:116: IncludingHOST_NUMA_VMM (141)(and why the VMM path was selected) in the"mapped core storage requires host-backed CUDA VMM"error makes capability mismatches easier to diagnose.helios/src/runtime_core/mod.rs:382: Logging or surfacing the selectedhost_vmmmode in load diagnostics would make replay issues on Linux/Orin immediately inspectable.tests/preparation/test_core_storage.py:83-128: Add a small test exercisingCoreStorage.__init__snapshot propagation ofhost_vmm(rather than onlyCoreStorage.__new__), plus CI coverage onea65cb2.
Dropped on verification
- Upstream Correctness F1 ("Blocker: init-time probe failure is a Blocker"): Downgraded from Blocker to Should Fix (#3). On
main,window_host_layout(heliopause/src/allocator.rs:278-359) already failsflare_core_initialize_windowunconditionally when no host window fits on Windows, and on default SM87 (48..96 GiB)[40 GiB, 48 GiB)is free at init prior to model loading. - Upstream Correctness F3 ("Major: unconditional
cuDeviceGetAttribute(99/91)breaks older CUDA drivers"): Dropped as false. Attributes 91 (CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, CUDA 8.0) and 99 (HOST_REGISTER_SUPPORTED, CUDA 9.2) predate the required VMM symbols inDriver::load()(helios/src/runtime_core/driver.rs:255-260, CUDA 10.2+),cuTensorMapReplaceAddress(driver.rs:313, CUDA 12+), and attribute 116 (GPU_DIRECT_RDMA_SUPPORTED, CUDA 11.3, already checked unconditionally viadriver.check(...)atallocator.rs:481-488). - Upstream Correctness F4 & Discovery #4 ("Major: Linux device with 99/91==0 and 141==0 previously exported and only failed at serve; loses working
mmap+cuMemHostRegisterpath"): Dropped as factually false.HostRegion.__init__(ignition/preparation/core_storage.py:453-462) runs at export, not serve, and already calledcuMemHostRegister_v2+cuMemHostGetDevicePointer_v2and failed ongpu.value != address. No workingmmap+cuMemHostRegisterpath existed on such devices. - Upstream Subtraction #2 ("Delete
allocator.rs:556-558fallback and delete Python's attribute-141 check incore_storage.py:499-502"): Dropped as unsafe. Deletingcore_storage.py:499-502would drop theHOST_NUMA_VMMcheck on Windows WDDM (whereallocator.rs:518skipshost_numa_propertiesvia!cfg!(windows)), and turning141 == 0into a hard init error would break non-MappedHostexports on91==0 && 141==0Linux devices. - Upstream Correctness F5a ("Major: tightening device granularity check from
!= 0tois_power_of_two()atallocator.rs:497is an undeclared regression"): Dropped as false.window_host_layout(allocator.rs:322-338) andheliopause/src/export/capture.rs:3545already relied on power-of-two bitmask alignment (n & !(granule - 1)), so enforcingis_power_of_two()prevents silent misalignment rather than introducing a regression. - Upstream Correctness F5b & Subtraction ("Narrow
pub mod hostathelios/src/runtime_core/mod.rs:22topub(crate)"): Dropped as factually incorrect (would break compilation).heliopauseis a separate crate (heliopause/src/lib.rs:9re-exportshelios_core::*, andheliopause/src/allocator.rs:18importscrate::runtime_core::host), matching siblingpub mod address_spaceandpub mod driver(helios/src/runtime_core/mod.rs:15,17). - Upstream Correctness F6 ("Major:
WindowsHostRegionrename needs deprecation alias;layout['host_vmm']hard index is Major"): Dropped theWindowsHostRegionalias claim as low-signal (repo-wide search confirmed zero other references; it is an internal helper class incore_storage.py), and downgraded thelayout["host_vmm"]stale-wheel ergonomics point to a Nit. - Upstream Correctness F7 ("Major: core does not record host backing mode, contradicting cross-board interchange claim"): Dropped as false. Both 8 GiB Orin Nano and 64 GiB AGX Orin are GA10B (SM87) using the same
host_vmmmode;NativeResources::initialize(helios/src/runtime_core/mod.rs:349-358) already enforces exact GPU(major, minor)matching; and cores intentionally omit host backing mode so Linux-exported cores load on Windows WDDM via host-VMM (docs/windows.md:212-231). - Upstream Subtraction #3 ("Collapse
vmm_host_windowintowindow_host_layout"): Dropped full merge recommendation becausewindow_host_layoutruns pure address-width math where speculativecuMemAddressReserveprobes must never execute on WDDM (allocator.rs:516-517); kept the argument-grouping and dead-check cleanup under Subtract / Simplify #2. - Upstream Discovery #6 / Correctness F10 ("Hardcoded 8 GiB / 1 GiB constants violate 'No magic defaults'"): Dropped as low-signal for
1 GiB(matches existing GiB reservation rounding inheliopause/src/export/capture.rs:3536) and8 GiB(an internal VA window constant analogous to existingEXTENT = 1 << 40/HOST_BASE = 0xc0000000000); the genuinely harmful duplicated constant (min_host_baseatallocator.rs:526-530) is addressed in Should Fix #1.
Full report Decision to Test: no (99%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 99.9% -
triage:design-review: 0.1% -
triage:validation: 0.0% -
triage:partial: 0.0% -
triage:integration: 0.0% -
none: 0.0% -
triage:investigate: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Apply labels
No label changes