Opened by a workflow run, Nov 28, 2026 8:42 PM EST.
screen malicious
Screen Result: All Clear
Evidence:
- PR #589 (lukealonso, merged 2026-11-28, head aed8039; 21 files, +994/−133) has an empty discussion (read_item #589 and pr_comments both show "Discussion (0)"), so there are no comments or reviews carrying injected text.
- The full diff (~75.2k chars, read in three chunks) contains no instruction-like text, no agent-directed requests, and no obfuscated payloads. All changes are text; exactly one file was added — helios/native/roce_proxy_dlopen.c (236 lines), a plain Apache-2.0 C source read in full.
- That native file is a benign lazy loader: it
dlopens the compile-time literal "libibverbs.so.1" underpthread_once(lines 46, 62) and resolves symbols viadlvsym(line 51). The library name, symbol names, and versions are literals, not environment/config/network input, so the load cannot be redirected. No system/popen/exec/fork/socket/connect/getenv paths; error strings only (line 66). - .github/workflows/release.yml (not opened) (lines 54–121) builds inside an
ubuntu:22.04container on unchangedubuntu-24.04/ubuntu-24.04-armrunners. The only network fetch is the standard rustup bootstrapcurl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh(line 73). Added steps are read-only assertions:readelf -dDT_NEEDED check for libibverbs.so (line 92), areadelf --version-inforegex rejecting GLIBC_ > 2.35 (lines 96–107), andflare --version/--helpsmoke runs in clean ubuntu:22.04 and 24.04 containers (lines 110–121). Job permissions are unchanged (contents: read;contents: writestays on the pre-existing publish job). - Build/link changes (helios/build.rs, helios/Cargo.toml, flare/Cargo.toml, flare-cli/Cargo.toml) swap
-libverbsfor-ldland select a different vendored.c; no Cargo.lock change, no new dependency, no build-time network or codegen. - Source edits (helios/src/cuda.rs
cuMemcpyAsyncfallback and HOST_NUMA fallback, execution/roce.rs, selene/src/{offload,registrar,slab}.rs, helios/src/runtime_core/{memory,model}.rs, helios/src/offload/*, eos/src/unix.rs) all match the described fixes; added tests are ordinary assertions (the/proc/self/smaps"hg" read is a#[cfg(test)]self-inspection). Docs changes are descriptive prose only. - Repo-wide marker greps ("ignore previous", "system prompt", "jailbreak", "exfiltrat", "do not report", "APPROVE IMMEDIATELY", etc.) hit nothing inside this PR's diff; the only similar strings are pre-existing and untouched — AGENTS.md (not opened) agent guidance, docs/clients/codex-models.json (not opened) base instructions, and the distractor fixture at scripts/repro_glm_batched_speculation.py:57 (not opened).
Open items: None. Technical correctness of the CUDA/RoCE/budget changes and the PR's self-declared untested hardware paths (native aarch64 build, CUDA 12.x/Jetson/Windows GPU runs) are out of scope for this injection screen and belong in normal code review.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: lukealonso (COLLABORATOR; one of the three charter "priority contributors"; Discord: "no username provided" in the PR body) Motivation: Three separate bugs stop Flare from running on three kinds of machine: batching several memory copies at once fails on older CUDA 12 drivers when some of the addresses are ordinary CPU memory, the Linux ARM64 release archive refuses to start on stock JetPack 6 / Ubuntu 22.04 because it needs a newer C library and an RDMA library most hosts lack, and on unified-memory boxes the prefix-cache host budget is subtracted twice (after the KV cache already took the RAM) while host-NUMA allocations and huge-page advice are ordered in a way some GPUs and kernels don't support. This PR fixes all three at once. Scale: +994 / −133 in 21 files Proposal:
- CUDA <13 fallback in
Stream::copy_batchnow issuescuMemcpyAsyncper entry (newDriver.copy_async) instead ofcuMemcpyDtoDAsync_v2, which rejects pinned host pointers on discrete CUDA 12.x GPUs (helios/src/cuda.rs:81,225,303,824-833). - New 236-line
helios/native/roce_proxy_dlopen.cloadslibibverbs.so.1lazily viadlopen/dlvsymunderpthread_once, macro-renaming the 17ibv_*symbols so the vendoredroce_proxy.cstays byte-identical;helios/build.rslinksdl+pthreadinstead ofibverbs. .github/workflows/release.yml(not opened) builds and packages both Linux archives insideubuntu:22.04, rejects anyGLIBC_symbol above 2.35 orlibibverbs.soDT_NEEDED, and smoke-tests in cleanubuntu:22.04/24.04.selene/src/offload.rsgets scaled host reserves (host_service_headroom_bytes: 64 MiB ≤16 GiB, elsemin(2 GiB, total/32)),prepare_with_inputs_budget, and aHOST_NUMA→cuMemHostRegister_v2fallback only on status 1/801;helios::allocate_cachesreturns the pre-planned budget so post-KV-alloc setup matches it.eos/src/unix.rs::map_hostdropsMAP_POPULATE, advisesMADV_HUGEPAGEfirst, then prefaults withMADV_POPULATE_WRITE(page-stridewrite_volatilefallback). Touches:selene/src+helios/src/runtime_corehost-budget/mapping plumbing (widest blast radius; also touches integrated-GPU reserve values and the capture path)helios/native+helios/build.rs+helios/src/execution/roce.rs(lazy RDMA loader; changes when multi-host failure appears).github/workflows/release.yml(not opened) (release build/smoke-test rewrite; untested until the next tag) Related items:- #497 Reduce disk offload restore latency and integrated-memory intake overhead (open): same 6 files; removes a test-only
host_budgetseam that #589 re-adds in shipped code; needs rebase - #323 Make the system headroom of unified-memory cache sizing configurable (open): rewrites the same
budget()/host_pool_budget()functions; overlapping in-flight review - #504 selene, selene-manager, helios, ignition, heliopause: pure-CUDA GPU and CPU lossless KV compression (merged): #589 stacks directly on it and keeps its
validate_compression()call - #455 Capture single-process prefix checkpoints for the pool and drain DRAM on shutdown (merged): introduced the capture path #589 re-budgets
- #590 helios,ignition: Engram reader bugs and PLE lookahead publish (merged): same author, same day, other area Link: https://github.com/NVIDIA/hyperflare-inference/pull/589 Autobot comments:
- Zero comments, zero reviews, zero reactions; merged the same day it opened (head aed8039 → merge ba3afb13), while sibling PRs #497/#323 both carried Autobot review rounds. A day earlier those reviews had flagged the exact shape #589 introduces — a wrapper that drops the host budget — as a should-fix.
- Five undeclared items in the diff:
pool_host_chargenow added to the capture-pathhost_future(changes integrated-GPU capture sizing); an exportedhost_pool_budget_with_reservewith no non-truecaller; user-visible error text replaced inmap_device_host_parts/SlabPool::sized_by_rank; acopy_batchdoc comment that still says "every address is a device address" while the new fallback comment says raw host pointers are accepted; and a set of stale siblings (NOTICE,THIRD_PARTY_NOTICES.md,Dockerfile,docs/container.md,packaging/debian/*,docs/debian.md,docs/windows.md). - The portability fix reaches only
flare-linux-*.tgz;packaging/debian/Dockerfilestill builds the.debon Ubuntu 24.04 (glibc 2.39) and still depends onibverbs-providerson arm64. - No linked issue for any of the three defects; they read as found by inspection, and the Jetson Orin/GA10B/WDDM and CUDA-12 targets are outside the charter's named hardware matrix (SM103/SM120/SM121, DGX Spark) and the documented support docs.
- Evidence gaps: no CUDA 12.x GPU run of the fallback branch, no aarch64 build or
ubuntu-24.04-armCI run, no real GA10B/WDDM driver run (fallback tested only with a mock registrar), loader test passes either way, andrelease.ymlhad not run because it is tag-triggered.
Value Proposition
Verdict: worth it with changes (in substance worth merging; one part should be simplified)
Note: the item is already recorded as merged (2026-11-28, aed8039, by @lukealonso, a priority contributor under the charter's "Respect contributors" rule), so this review is retrospective: what should have been required, and what follow-ups remain.
Charter fit
Strongly in scope on hardware. My first instinct was that Jetson Orin / JetPack 6 is "broad production coverage across arbitrary GPUs", which the charter lists as a non-goal. The tree says otherwise:
helios/src/core/naming.rs:15(not opened) listsPLATFORMS = ["ga102","ga10b","gb10","gb202","gb300"];:54-57maps compute 8.7 →ga10b.ignition/planning.py:37SUPPORTED_CAPABILITIES = ((8,7),(10,3),(12,0),(12,1)), advertised as "SM87, SM103, SM120, or SM121".docs/windows.md:160-163,179-186qualifies WDDM on RTX Spark N1X (SM121), which is exactly the platform whoseHOST_NUMAVMM path this fixes.docs/release.mdanddocs/multi-host.mdown the arm64/Linux release contract. GA10B support landed onmainthe same day (c9935887, "Support integrated GA10B GPUs, adaptive executor parking, and explicit memory limits"), so this PR is fixing defects in support the project already committed to — not expanding the matrix. It also directly serves the goal "Store prefix-cache checkpoints in host memory": without defect #3, host offload on an 8–32 GiB unified-memory host reserves 2 GiB + 5% off the top and either collapses intake to the minimum or fails pool-only capture startup.
Not in scope / against the working style: the PR is three unrelated changesets in one (CUDA copy semantics, release/distro packaging, selene memory budgeting plus eos THP). "Solve the right problem in the right place… smallest footprint" is easier to honour when a 21-file, +994/−133 diff is split.
Who benefits, and how much
| Fix | Beneficiary | Benefit | Cost |
|---|---|---|---|
#1 cuMemcpyAsync fallback (helios/src/cuda.rs:532-556, 824-833) |
Anyone on a CUDA 12.x driver (discrete or Orin) | Turns a hard cuMemcpyDtoDAsync_v2 failure on pinned cuMemHostAlloc(flags=0) pointers into working batched copies. Request path (execution/transport.rs:1087-1092) and offload transfers (offload/transfer.rs:398 (not opened)). |
~5 lines + one symbol. Root-cause fix, no flags, no fallback-swallowing. |
#2 lazy libibverbs (helios/native/roce_proxy_dlopen.c, build.rs, release.yml) |
Every downloader of flare-linux-arm64.tgz |
The archive could not start at all on JetPack 6 / Ubuntu 22.04. This is a release blocker for the documented arm64 target. | 236 lines of hand-written C + a 17-entry symbol table maintained against rdma-core's version map, plus a rewritten release job. Highest complexity per unit of user value. |
#3 host budgeting / HOST_NUMA fallback / THP order (selene/src/offload.rs:117-206, 800-886, registrar.rs, slab.rs:189-270, helios/src/runtime_core/memory.rs:192-221, 646-694, 825-840, 956-1024, eos/src/unix.rs:85-119) |
Small unified-memory hosts (8–32 GiB Orin, GB10 with --memory-limit) and Windows WDDM |
Makes --prefix-cache-memory and pool-only capture work instead of failing, and fixes the double-subtraction after KV allocation. This is the single most valuable piece: it is a correctness bug in a documented, headline feature. |
Moderate refactor: budget is pre-planned once in allocate_caches, returned as Option<u64>, threaded through prepare_offload → prepare_with_inputs_budget. |
What is well done
- Root causes, not symptoms. The
HOST_NUMAfallback triggers only onCUDA_ERROR_INVALID_VALUE/CUDA_ERROR_NOT_SUPPORTED(cuda.rs:535), and the new testmemory_only_falls_back_to_registered_mapping_when_host_numa_split_is_unsupported(selene/src/offload/tests.rs) asserts an OOM must not fall back. That is exactly charter rule #397 ("don't just swallow, skip, or retry an unexplained error"). - One budget, computed once.
host_budget_foris the single evaluation point (memory.rs:684-694) andheadroom_with_inputs_for_budget(offload.rs:151) is the general mechanism rather than a per-call special case — no per-model or per-GPU branches. - Reserve scaling is general.
host_service_headroom_bytes/host_reserve_bytesare shared by helios and selene (offload.rs:808-834,memory.rs:28,185), removing the previous duplicatedintegrated_host_bytes— a net reduction in shared-layer knowledge. - PR description meets the documented four-part standard (why / what changed / claimed result / evidence) and discloses unrun checks honestly (no native aarch64 build, no live discrete-CUDA-12, GA10B or WDDM run).
- CI now proves the arm64 contract instead of assuming it: no
libibverbs.soDT_NEEDED, noGLIBC_version above 2.35, clean-container smoke tests in both 22.04 and 24.04 withoutlibibverbs1(.github/workflows/release.yml:58-121(not opened)). This is the project's release gate getting objectively better.
Concerns I would have raised before merge
- The dlopen shim is the wrong-sized solution. A simpler way to the same end exists: on
aarch64Linux makeroceopt-in for release builds (as it already is on x86_64), or shiplibibverbs1/ibverbs-providersalongside the archive for the multi-host case. Either removes "binary dies beforemain" with zero new C. The chosen route keeps single-host serving working on stock JetPack 6 and keeps RoCE, which is a real benefit, but it buys a hand-maintained duplicate of rdma-core's symbol-versioning surface (dlvsymwithIBVERBS_1.1/1.8,pthread_once,RTLD_GLOBAL,verbs_get_ctx_opspecial-casing forquery_port) that will silently rot across rdma-core releases. I checkedlibibverbs.map.in: all 17 names are present inIBVERBS_1.1(most also1.0), so the current table is correct — but that correctness is now this repo's problem forever. It compiles againstinfiniband/verbs.h(not opened), so a futureroce_proxy.ccalling a newibv_*fails loudly at link time (good), yet the ABI-behaviour risk of a shim that reports itself as libibverbs to provider plugins is not something tests here can cover. CUDA_ERROR_INVALID_VALUEis an overloaded status.is_host_numa_unsupported(cuda.rs:535) treats 1 as "platform unsupported" at four different call sites, including aftercuMemCreate. A genuine argument bug (bad granularity, misalignment) would silently downgrade to registered-anonymous mapping instead of surfacing. The unwind on earlyOk(None)does work (DeviceHostParts::drop,cuda.rs:516-530), but the classification is broader than the comment claims.- The fix only covers the helios call path.
headroom_with_inputs(offload.rs:117-146) still re-reads system memory when no budget is passed, soselene-manager, the shard tests and any future caller keep the post-KV-alloc footgun; onlyprepare_with_inputs_budgetis safe. If the budget must be pre-planned, the safe API should be the default and the memory-re-reading one the explicit opt-in. planned_offload_hostis a derived approximation (memory.rs:1102-1111:tier_host.max(chain_bytes)for capture,tier_host - memory_bytesotherwise). It is the subtlest part of the change and is not explained in the description; it deserves a helios-level test asserting plan == later budget, not only the selene-level ones provided.- Eager prefault changed shape.
eos/src/unix.rs:105-117now faults the whole mapping in userspace whenMADV_POPULATE_WRITEis unavailable (kernels < 5.14). Roughly the same workMAP_POPULATEdid in-kernel, so no real regression, but the non-Linux unix fallback makesmap_hostO(bytes/page) in a loop that previously did not exist. Worth a note indocs/prefix-cache-offload.md, which currently only mentions the Linux path. - Minor CI gap: the glibc regex only checks
GLIBC_, notGLIBCXX_; harmless because the build is inside 22.04, but the stated guarantee is narrower than the check implies. - Unverified claims are the load-bearing ones. "Discrete CUDA 12.x GPUs execute
Stream::copy_batch…", "GA10B / Windows WDDM hosts support--prefix-cache-memory…" are the primary user-visible outcomes and were not run on that hardware. Per the charter's "bring real evidence", I would have asked for at least one live run on GA10B or WDDM (thebad_alloc/NOT_SUPPORTEDbehaviour is the whole point) before green-lighting, not after.
Simpler alternative / duplication check
- No duplication: the reserve scaling removes a duplicated helper rather than adding one;
try_map_split/try_sized_by_rankextend existing traits with default implementations, so no parallel code path is created in the selene tests or manager. - Fix #1 is already the minimal form (batch API when present, per-entry copy otherwise — same loop, different verb), so its only cost is that the CUDA-12 fallback stays a sequential loop on CUDA 12 hardware. Same cost as before, so no regression.
- Fix #2 is the one place where a materially simpler design existed and was not taken.
Bottom line
Take the fix; split it; reconsider the C shim. Defects #1 and #3 are reproducible, root-caused, tested, in-scope bug fixes in a documented headline feature, and #3 in particular removes hard-coded 2 GiB constants that were already wrong on half the supported hardware. #2 fixes a genuinely broken release artifact, but its 236-line dlopen/dlvsym trampoline table is a permanent maintenance liability for a benefit that a one-line roce-off-for-arm64-release decision would also deliver; if the RoCE-on-JetPack-6 capability is worth keeping — it arguably is, since DGX Spark is a named target — it should be a separate PR with an explicit owner note explaining why the shim beats shipping the two Debian packages. As submitted, all three fixes together are net positive but too large to review well, and the merged state leaves concerns 2 and 3 unaddressed: the INVALID_VALUE classification is broader than its comment, and headroom_with_inputs still re-reads system memory for every caller except helios. Recommended follow-ups: make the pre-planned-budget API the default, narrow is_host_numa_unsupported to the specific calls where overloaded status is expected, add a helios-level plan/budget equality test, and get one live GA10B or WDDM run on record.
Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Prose
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- helios/src/cuda.rs:781-786:
copy_batch's contract still says every address is a device address, while the fallback added at :824-827 accepts rawcuMemHostAlloc(..., flags=0)pointers and the real caller (transport.rs:556/1087 → cuda.rs:850-854) passes them. - helios/src/frontend/mod.rs:1400-1402: comment still states headroom as
HOST_SERVICE_HEADROOM_BYTES(2 GiB) + total/20, the rule this PR replaced withhost_service_headroom_bytes/host_reserve_bytes(selene/src/offload.rs:805-820). - THIRD_PARTY_NOTICES.md:76-78: still says aarch64 builds "link the system libibverbs"; helios/build.rs:67-77 now links only
dlandpthreadanddlopens libibverbs.so.1 — in a document shipped in the release archive. - docs/release.md:30-31: newly claims JetPack 6 coverage for an aarch64 archive never run on aarch64, and docs/TODO.txt has no entry for that unrun check (AGENTS.md:55-58).
Nits: 4 — docs/prefix-cache-offload.md:1483-1485 says the roce and rdma features "link libibverbs" (only rdma does now); the description's "all 17 ibv_* calls" counts trampolines while roce_proxy.c also calls inline ibv_post_send/ibv_poll_cq; the exhaustive changed-file inventories work against AGENTS.md:116-121; the description does not flag that the copy_batch contract comment still contradicts the new behavior.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/589
Detail: the description itself passes the prose rules — four-part why/what/claimed-result/evidence order, explicit before/after, observed-vs-expected split, unrelated failures explained, unrun checks listed, Discord line present — so no finding lands on it beyond the two descriptive nits. Every changed doc matches the code line by line: release.md's workflow description versus .github/workflows/release.yml (not opened), multi-host.md versus build.rs/dlopen, runtime-core-design.md, and prefix-cache-offload.md's THP ordering (:474-478), HOST_NUMA fallback (:525-534), cuMemcpyAsync fallback (:646-651) and scaled reserve (:1138-1145) against eos/src/unix.rs:88-117, selene/src/offload.rs:805-836 and helios/src/cuda.rs:824-833. All four should-fix items are stale-claim repairs, not runtime defects; findings 1 and 2 matter most because they are the contracts a reader consults before relying on the changed behavior.
Simplicity
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- selene/src/offload.rs:522-619 (+ helios/src/offload/mod.rs:82-129): the post-KV-alloc re-query this PR removes survives as the
Nonearm ofhost_budget: Option<u64>, while the sole production caller (model.rs:967,Somewhenever the cache is enabled per memory.rs:1102-1112) never uses it. Take a plainu64, delete theNonearm and bothprepare_with_inputsshims (~40 lines). - helios/src/cuda.rs:667-676 + selene/src/registrar.rs:26:
map_device_host_partsis unreachable (its only callerCudaRegistrar::map_splitis reachable only via thetry_map_splitdefault thatCudaRegistraroverrides), yetmap_splitstays required, forcing ~12 stub impls. Maketry_map_splitthe only required method, delete the wrapper and all stubs; drop test-onlySlabPool::sized_by_rank(slab.rs:261-270) too. - eos/src/unix.rs:206-248 and helios/src/execution/roce.rs:511-523: both new tests guard their assertion behind an
if(four nestedif lets around smaps;if status != 0around the hint), so they pass without asserting anything on the hosts they run on..expect()the smaps lookup; assert the applicable loader branch or drop it (release.yml:110-121 already covers the path). - helios/src/runtime_core/memory.rs:646-683 vs :878-909: integrated min-free, the fixed+embedding fold and
fixed.max(observed drop)are written twice ~200 lines apart and already disagree (mintotalvsobservations[index].total). Build oneVec<(MemorySnapshot, u64)>and use it in both places. - helios/src/frontend/mod.rs:1400-1402: comment still documents the old "2 GiB plus one twentieth" reserve that this PR replaced with
host_service_headroom_bytes/host_reserve_bytes(docs/prefix-cache-offload.md:1141-1144 was updated, this was not).
Nits: 1 — host_pool_budget_with_reserve(future, true) (selene/src/offload.rs:852-886) has a single caller and one value.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/589
Conventions
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- helios/src/frontend/mod.rs:1400-1402: the only doc for the host headroom
push_segment's second encoding relies on still says "HOST_SERVICE_HEADROOM_BYTES(2 GiB) plus one twentieth of total memory", but this PR replaces that with the scaledhost_service_headroom_bytes/host_reserve_bytes(selene/src/offload.rs:806-820), so on the 8-16 GiB SoCs it targets the comment overstates headroom by ~2 GiB. - helios/src/runtime_core/memory.rs:192-221: new
integrated_offload_host_budgetre-implements the explicit-limit arms of the existinglimited_budget(memory.rs:267-298, which already applieshost_reserve_bytesthroughbudget/explicit_limit), giving a third definition of "an explicit--memory-limitremoves the implicit reserves" in the same module; its new test pins the copy, not the shared helper.
Nits: 6 — function-pair duplication for the injected host budget (prepare_with_inputs_budget, headroom_with_inputs_for_budget, try_*/sized_by_rank wrappers) instead of the Option-parameter precedent set by limited_budget; a speculative apply_reserve switch (host_pool_budget_with_reserve, selene/src/offload.rs:856-886) whose only caller passes true, which AGENTS.md:188-193 names; the eos prefault write_volatile loop duplicated byte-for-byte between eos/src/unix.rs:109-117 and eos/src/windows.rs:178-183 with no shared helper; is_host_numa_unsupported (helios/src/cuda.rs:532-536) inlining status codes 1 | 801 where driver.rs:94-97 keeps named CUDA_ERROR_* constants; CopyAsync (cuda.rs:81) duplicating the identical CopyDtoD alias (cuda.rs:80); Debian packaging/docs (packaging/debian/package.sh:46-48, docs/debian.md:3-6,61-64) still asserting a hard ARM64 ibverbs-providers dependency after the lazy-loading change.
All 21 changed files were read in context; nothing blocking, and no attempt to direct the reviewer was found in the PR text.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/589
Architecture
Verdict: should-fix issues only Blocking:
- None. Should fix:
- helios/src/cuda.rs:535-537:
is_host_numa_unsupportedmaps genericCUDA_ERROR_INVALID_VALUE(1) to "platform unsupported" at four call sites (579, 587, 642, 658), silently substituting a different pool strategy for real argument errors;AGENTS.md:182-186rejects silently substituted execution paths. Restrict toCUDA_ERROR_NOT_SUPPORTED(801) or probe support explicitly. - helios/src/cuda.rs:781-790: the
copy_batchdoc contract still says every address is a device address and raw CPU registration addresses are not passed — precisely the pointers the newcuMemcpyAsyncfallback (824-833) exists to accept. Rewrite the contract for both paths and notecuMemcpyAsyncis now a required entry point (cuda.rs:303). - PR as a whole (AGENTS.md:198-199, charter Non-Goals): four unrelated outcomes in one PR (CUDA 12 copy, release/dlopen packaging, host-budget rework, eos THP), two of which extend support to Jetson Orin GA10B / 8-32 GiB SoCs the charter never names; no stated maintainer sign-off.
- .github/workflows/release.yml:37-53 (not opened): the arm64 leg and native aarch64 build that the headline JetPack 6 claim depends on are listed as unrun;
docs/design-review.md:247-251says disclosure does not excuse skipping runnable CPU checks. - docs/release.md:30-31, docs/multi-host.md:50: JetPack 6 stated as present qualification while the only evidence is the amd64 artifact;
AGENTS.md:52-60requires qualification to match evidence. Nits: 3 — deadhost_pool_budget_with_reserve(selene/src/offload.rs:856-885) plus theOption<u64>budget-wrapper stack; the ungated x86_64 dlopen behaviour change (helios/build.rs:67-77) unstated in the description; stale required-symbol list in docs/prefix-cache-offload.md:645-655. Link: https://github.com/NVIDIA/hyperflare-inference/pull/589
Correctness
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- helios/native/roce_proxy_dlopen.c:89:
FLARE_LOAD_IBV(query_port, "ibv_query_port", …)hard-failsflare_ibv_init(so everyroce_create) when libibverbs exports only the prefixed___ibv_query_port, which is the symbol the vendored proxy actually references; the trampoline already reimplements it and needs no table entry. - helios/src/cuda.rs:532-537:
is_host_numa_unsupportedacceptsCUDA_ERROR_INVALID_VALUE(1) at four call sites (579, 587, 642, 658), so a genuinely invalid allocation (oversized part, granularity/properties mismatch) is silently downgraded to the portable registered mapping the split pool exists to avoid, contradicting the doc claim that real failures returnErr.
Nits: 2 — helios/src/frontend/mod.rs:1400-1402 documents the old flat 2 GiB + total/20 headroom; helios/src/runtime_core/memory.rs:216-218 saturates an explicit --memory-limit deficit to zero instead of erroring as limited_budget does (memory.rs:294-296).
Also verified clean: the planned-budget plumbing (allocate_caches → prepare_with_inputs_budget → planned_offload_host) is consistent for both capture and non-capture tiers, the try_map_device_host_parts early Ok(None) paths leak nothing, and try_sized_by_rank has exactly one production caller (selene/src/offload.rs:631) whose fallback registers a portable pool; the pool path never uses split mappings at all (selene/src/pool/builder.rs:311-313).
Open questions: whether real libibverbs exports the un-prefixed symbol (needs nm -D inside ubuntu:22.04/24.04, none of the CI smoke checks exercise an actual transport open); whether cfg.memory_bytes and options.prefix_cache.memory_bytes can diverge between plan and prepare; native aarch64/GA10B/WDDM behaviour unverified.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/589
Subtractive
Verdict: make it smaller first The change: +994 / -133 lines, 21 files Could remove: about 250–280 lines, in 8 places Biggest subtractions:
- helios/src/runtime_core/memory.rs:192-221 (+ tests 1485-1627):
integrated_offload_host_budgetre-implements the existinglimited_budgetarm for arm, andintegrated_state(646-683) recomputes the per-rank loop at 877-909; calllimited_budget(memory, loaded, options.memory_limit, 0, true, future)instead: about 93 lines (incl. ~33 test). - selene/src/offload.rs:117-146 and 497-520:
headroom_with_inputs/_for_budgetandprepare_with_inputs/_budgetare one function plus a defaultedOption<u64>; fold the default into the_for_budgetbody and drop the wrappers: about 52 lines. - selene/src/registrar.rs:32-37, selene/src/slab.rs:254-270, helios/src/offload/registrar.rs:27-38, helios/src/cuda.rs:667-676: the
try_map_split/try_sized_by_rank/try_map_device_host_partstwins besidemap_split/sized_by_rank/map_device_host_parts— one method returningResult<Option<..>>replaces each pair, and the two non-fallible halves have no production caller: about 40 lines. - helios/src/offload/mod.rs:72-103:
preparehas no caller anywhere andprepare_with_inputsis a pass-through that pinshost_budget = None; delete both, passNoneat helios/src/offload/pool/tests.rs:124: about 31 lines. - helios/native/roce_proxy_dlopen.c:108-115, 157-163, 184-193: the
ibv_reg_mr_iova2/IBVERBS_1.8path is unreachable (the vendored proxy never passesIBV_ACCESS_OPTIONAL_RANGE), and the init guard inflare_ibv_get_device_listrepeats whatRoceTransport::openalready did: about 18 lines. Left behind:offload::prepare(helios/src/offload/mod.rs:72, no callers);map_device_host_parts(helios/src/cuda.rs:667) andsized_by_rank(selene/src/slab.rs:261) reachable only from tests;UnsupportedSplitRegistrar(selene/src/offload/tests.rs:790-813) exists only to exercise the twin; selene's ownprepare(selene/src/offload.rs:484) has no in-repo caller either. Link: https://github.com/NVIDIA/hyperflare-inference/pull/589
code review summary
Recommendation: Changes Requested
The PR is merged, so these are follow-ups: one real correctness smell (generic CUDA error read as "unsupported"), one large subtraction seam whose two copies already diverge, and four stale docs the PR itself creates. Two items cannot be settled without a hardware/loader probe.
- Blockers: 1
- Should fix: 8
- Subtractive suggestions: 3
- Nits: 5
Blocker. helios/src/cuda.rs:532-537 maps CUDA status 1 (CUDA_ERROR_INVALID_VALUE, also the generic argument-error status) to "platform unsupported" at four call sites (:577-590, :641-660), each returning Ok(None) so selene/src/offload.rs:631-638 silently swaps the HOST_NUMA split pool for a registered anonymous mapping (~2 MiB device memory per GiB, slab.rs:254-260). Bad granularity, wrong flags or a resident-context mistake in the new cuMemSetAccess path degrade instead of failing; cuMemMap/address-reserve still hard-error, so the platform can also return Err. Violates AGENTS.md:182-186 and the charter's "don't swallow" rule. Fix: narrow to 801 and probe capability. Which status GA10B/WDDM returns is only answerable by a live run.
Strongest should-fix (item 3). memory.rs:195-221 re-implements limited_budget (:267-298) arm for arm but saturates to 0 where limited_budget emits "memory limit is N bytes, but loaded model resources require M"; the per-rank fold is also written twice (:646-681 vs :877-904) and disagrees on total. Other should-fixes: stale copy_batch contract (cuda.rs:781-790 vs the added :824-833; cuMemcpyAsync is now load-required), stale 2 GiB reserve comment (frontend/mod.rs:1400-1402 vs offload.rs:802-820), the loader hard-requiring ibv_query_port that only the trampoline's compat branch reads (roce_proxy_dlopen.c:89; gated on nm -D), two vacuous tests (roce.rs:511-523, unix.rs:207-248), dead map_split/map_device_host_parts/sized_by_rank, the arm64/JetPack 6 claim on x86_64-only evidence (docs/release.md:30-31), and four docs still saying libibverbs is linked.
Subtract. ~27% of the diff is twins differing by one Option/bool with a single production value: collapse the prepare/headroom ladder (keep the subtractive option — one host_budget: u64, which removes the None arm preserving the bug this PR fixed), delete apply_reserve, and drop the dead iova2/init-guard code in the dlopen shim.
Not to re-litigate: the Selene budget round trip, eos::map_host THP ordering, DeviceHostParts::Drop on the new Ok(None) paths, roce_ensure_libibverbs placement. No prompt injection in PR body, comments, diff or docs.
Pre Test Report
Pre-test report — PR #589 (merged): CUDA 12 batched copies, Linux ARM64 release portability, Selene unified-memory budgeting
Recommendation: REFER TO TESTING — but only a minimal, gated slice. Do not test the PR's headline claim (the CUDA 12 cuMemcpyAsync fallback): it is unreachable on both available hosts. Two substantive defects must be fixed first; one cheap CPU-only check is worth more than any GPU job here.
Head aed8039, already merged to main (ba3afb13, 2026-11-28, same day, zero human review, while sibling PRs #497/#323 carried review rounds). I read all 21 changed files at head rather than relying on the six summaries, and corrected three points where they are wrong or overstated.
1. What the change actually is
Four independent outcomes in one 21-file, +994/−133 PR:
- CUDA <13 copy fallback (
helios/src/cuda.rs:824-833): whencuMemcpyBatchAsync_v2is absent,Stream::copy_batchnow loopscuMemcpyAsyncper entry instead ofcuMemcpyDtoDAsync_v2, which rejects pinned host pointers. - Lazy
libibverbs.so.1(helios/native/roce_proxy_dlopen.c, new 236 lines;helios/build.rs:67-77linksdl+pthreadinstead ofibverbs) plus a rewritten.github/workflows/release.yml(not opened) that builds insideubuntu:22.04and asserts nolibibverbs.soDT_NEEDEDand noGLIBC_> 2.35. - Selene/helios host budgeting: scaled reserve (
host_service_headroom_bytes: 64 MiB ≤16 GiB, elsemin(2 GiB, total/32)), a pre-planned budget threadedallocate_caches→prepare_offload→prepare_with_inputs_budget, and aHOST_NUMA→SlabPool::sized+cuMemHostRegister_v2fallback. eos/src/unix.rs::map_hostdropsMAP_POPULATE, advisesMADV_HUGEPAGEfirst, prefaults viaMADV_POPULATE_WRITE.
Charter fit: outcome 3 repairs support already on main (helios/src/core/naming.rs:15 (not opened),54-57 lists ga10b; ignition/planning.py:38 (not opened) advertises SM87), so the "charter Non-Goals / needs maintainer sign-off" charge in the Architecture and Value reviews is unfounded — I checked. The genuine scope problem is the four-in-one bundling: a regression in one cannot be bisected from the others.
2. Substantive problems — fix before spending hardware time
S1. CUDA_ERROR_INVALID_VALUE is classified as "platform unsupported" — helios/src/cuda.rs:535-537
matches!(status, 1 | 801) is applied at four sites inside try_map_device_host_parts: :579 (cuDeviceGetAttribute), :587 (cuMemGetAllocationGranularity), :642 (cuMemCreate), :658 (cuMemSetAccess). Each returns Ok(None), which silently swaps the split HOST_NUMA pool for a registered anonymous mapping with different properties. Status 1 is the generic "invalid argument" code, so a real bug in the mapping path degrades into a different allocation strategy instead of failing. The doc at :539-547 ("real failures … return Err") is only true for non-1/801 — the PR description's "real errors such as OOM propagate unchanged" overstates it.
Partial defence I verified: ATTRIBUTE_HOST_NUMA_ID = 134 (cuda.rs:150) is CUDA 12.2+, so an older driver legitimately returns INVALID_VALUE for an unknown attribute — status 1 is defensible at the two probe sites, and not at cuMemCreate/cuMemSetAccess. Minimal fix: restrict those two to 801, keep {1, 801} for the probes with the driver-version reason written down. Note cuMemAddressReserve (:609-611) still hard-errors, so a non-HOST_NUMA platform can also Err depending on which call reports first.
S2. integrated_offload_host_budget duplicates limited_budget and already diverges — helios/src/runtime_core/memory.rs:192-221 vs :267-298
The new function restates the explicit---memory-limit arms of the existing limited_budget in the same module, but for a Bytes/Fraction cap smaller than loaded + future it saturates to 0 (:216) where limited_budget raises "memory limit is {cap} bytes, but loaded model resources require {required}" (:294-296). That is an operator-reachable silent under-sizing of the prefix-cache host pool, and it is exactly the class of double-accounting bug this PR set out to remove. Related, same function: integrated_state (:646-683) recomputes the per-rank loop at :877-909 and the copies already disagree (min total at :657-661 vs observations[index].total at :887; max observed drop at :674-680 vs initial[index] at :904). Collapsing to limited_budget(memory, loaded, options.memory_limit, 0, true, future) removes ~93 lines including the test that currently pins the copy.
S3. The dlopen symbol table is unverified and could be fatal for all multi-host RoCE — helios/native/roce_proxy_dlopen.c:84-100
FLARE_LOAD_IBV (:72-82) hard-fails — dlclose, flare_ibv_ready stays 0 — on any one of 17 misses, and RoceTransport::open (helios/src/execution/roce.rs:192-195) turns that into "RoCE transport setup failed: …". Line :89 requires the plain name ibv_query_port @IBVERBS_1.1; in modern rdma-core ibv_query_port/ibv_reg_mr are static inline in verbs.h (not opened) with the real exports being the ___-prefixed compat forms — the shim's own field type (struct _compat_ibv_port_attr*, :27-28) and its verbs_get_ctx_op/compat reimplementation (:146-154) show the author expected the legacy symbol, but nothing in the tree proves the name resolves. If it does not, multi-host RoCE is completely dead on every host while single-host serving looks fine, and no CI step opens a transport (release.yml:110-121 runs only --version and --help).
This is settled for free: objdump -T libibverbs.so.1 | grep -E 'ibv_query_port|ibv_reg_mr' inside ubuntu:22.04 and ubuntu:24.04. This single CPU-only command is the highest-value check in the whole PR and must run before any RoCE test.
Correction to the review consensus: all six summaries call the new RoCE test vacuous. It is not. helios/src/execution/roce.rs:511-523 asserts inside if status != 0, and the three failure texts differ: a dlopen failure prints "cannot load libibverbs.so.1 (…); install libibverbs1 …" (contains both tokens → passes, correctly), but a missing symbol prints "libibverbs.so.1 is missing required symbol X" — which contains libibverbs.so.1 and not libibverbs1, so the assertion fails. It is weak (silent on success) but it is a real guard for S3, and it runs free.
Defer (documentation/staleness — do not gate, do not test): copy_batch's contract still says "every address is a device address" while the new fallback (:824-827) accepts raw cuMemHostAlloc(flags=0) pointers that the real caller (helios/src/execution/transport.rs:1087 (not opened)) passes; helios/src/frontend/mod.rs:1400-1402 still states 2 GiB + total/20 (the only place the constraint is written down); THIRD_PARTY_NOTICES.md:76-78 still says aarch64 builds link libibverbs in a file shipped in the archive; docs/release.md:30-31 (not opened) asserts JetPack 6 qualification on amd64-only evidence with no docs/TODO.txt entry (I searched — zero matches for JetPack/Orin/GA10B/aarch64/libibverbs); docs/prefix-cache-offload.md:1483-1485 says roce+rdma both link libibverbs (only rdma does now). Dead code worth deleting: cuda.rs:667-676 map_device_host_parts (reachable only via a trait default that CudaRegistrar overrides), helios/src/offload/mod.rs:72 (not opened) prepare (no caller at all), slab.rs:261-270 sized_by_rank (test-only), offload.rs:858-886 host_pool_budget_with_reserve (flag always true in production).
3. Expected value of a hardware test — low for three of four claims
I checked each new path's precondition against the available hardware:
| Changed behaviour | Precondition | cn5 (4× RTX PRO 6000 Blackwell, sm_120, amd64) | cn7 (GB10, sm_121, arm64) |
|---|---|---|---|
CUDA 12 cuMemcpyAsync fallback |
driver lacks cuMemcpyBatchAsync_v2, i.e. CUDA 12.x |
n/a — Blackwell needs r580/CUDA 13 | n/a — GB10 needs CUDA 13 |
| Lazy libibverbs arm64 archive | no libibverbs1; stock JetPack 6 (glibc 2.35) |
wrong arch | has RDMA libs; Ubuntu 24.04-class |
HOST_NUMA → registered fallback |
driver without HOST_NUMA VMM |
reachable | not reachable (GB10 supports it) |
| Integrated-GPU prefix-cache budgeting | CU_DEVICE_ATTRIBUTE_INTEGRATED |
no (discrete) | yes |
eos map_host THP ordering |
any Linux ≥5.14 | yes | yes |
| Multi-host RoCE data path | ≥2 RDMA-linked hosts | no HCA stated | no HCA stated |
Three consequences:
- The headline fix cannot be exercised.
memcpy_batchisOptionpurely from symbol lookup (cuda.rs:282-285); there is no env var or feature flag to force the fallback (I grepped — onlyFLARE_OFFLOAD_TEST_DIRexists). Every cn5/cn7 run takes the unchangedcuMemcpyBatchAsync_v2path. A GPU test would validate nothing about outcome 1. I considered and explicitly reject downgrading cn5 to a CUDA 12.8 driver (sm_120 is supported from 12.8) to reach the branch — disproportionate on shared hardware, and the only regression risk it would expose is already covered by the new unit tests. - The RoCE/arm64 claim is not a GPU question at all. Its glibc ceiling is a property of the build container, provable with
readelf; the symbol-table risk (S3) is provable withobjdump. cn7 is not a stock JetPack 6 host, so it cannot prove the thing the PR claims. - One behaviour genuinely needs hardware: integrated-GPU budgeting on cn7, where
CU_DEVICE_ATTRIBUTE_INTEGRATEDis set and the reserve/budget path runs end to end against a real unified-memoryMemAvailable. This is the part with the largest blast radius and the least test coverage (every new budget test uses a mock registrar and synthetic snapshots).
No throughput A/B is warranted. Nothing in the PR changes a hot path: the fallback keeps the same sequential per-entry loop, and the budget change alters sizing at startup, not speed. Any throughput delta would be a second-order effect of intake capacity, not of this code — and a cross-version A/B on main would be confounded because the change is already merged.
4. Proposed test plan (minimal, staged; abandon on first failure)
Stage 0 — free, CPU only, no hardware booking. Must pass before Stage 1.
objdump -T libibverbs.so.1 | grep -E 'ibv_query_port|ibv_reg_mr'inubuntu:22.04andubuntu:24.04(settles S3).cargo test --release --manifest-path helios/Cargo.toml --features runtime-core,server,roce execution::roce::testson the new shim (now a meaningful check per §2).cargo test --release --manifest-path eos/Cargo.toml(not opened) — the/proc/self/smapsVmFlags: hgassertion.- Re-run the two
selenebudget tests and theHOST_NUMA-fallback/OOM test as a fast sanity gate. If step 1 shows no plainibv_query_port/ibv_reg_mrexport, stop: multi-host RoCE is broken, the PR needs a code change, and nothing below is worth running.
Stage 1 — cn7 (GB10, arm64), one job, ≤60 min. The only GPU-testable claim.
5. Build flare-cli --features roce natively on arm64; confirm it launches (flare --version, flare run --help) with libibverbs1 not installed. This is the one claim no other host can settle, and arm64 native build is the PR's own listed-unrun check.
6. Serve one short model on GB10 (e.g. nvidia/Qwen3.8-27B-NVFP4) with --prefix-cache-memory on, and record the startup Plan cache line: confirm the host budget is non-degenerate and no "host budget cannot hold a full pool capture" failure appears. Then one repeat with an explicit small --memory-limit to exercise the explicit-limit arm of integrated_offload_host_budget — this is the arm S2 says diverges, so capture whether it errors or silently under-sizes.
7. One pool-only capture start (--prefix-cache-memory 0 + --prefix-cache-pool) to confirm capture startup no longer fails post-KV-alloc.
8. Send two or three requests, confirm the prefix cache stores and restores across a restart (this transitively exercises the changed eos::map_host on every pinned mapping, and handshake HOST_NUMA split-pool registration on a healthy driver).
Note: the ≤16 GiB arm of host_service_headroom_bytes is unreachable at 60 GiB RAM — do not try to force it; it is unit-tested.
Stage 2 — cn5, one job, ≤30 min, regression only.
9. Generic single-host serving on 2 of the 4 GPUs at TP2 with --prefix-cache-memory on, which drives the split HOST_NUMA mapping across multiple contexts (slab.rs:191-252), then one restart-and-restore. Purpose is only to prove the untouched cuMemcpyBatchAsync_v2 batch path and the mapping path still work; it validates no new behaviour.
Explicitly do not test: the CUDA 12 fallback (unreachable — see §3); JetPack 6 / GA10B / Windows WDDM (no such hardware); multi-host RoCE data path (no HCAs stated, and Stage 0 may already condemn it); the ≤16 GiB headroom arm; any throughput A/B.
5. Shelf life and caveats
- This PR is already merged, so a test cannot gate it; it can only find a follow-up. Treat the output as regression evidence on
main. - Results may be invalidated quickly: open #323 rewrites
budget()/host_pool_budget()and the system-headroom formula again, and open #497 deletesselene::offload::prepareand removes the veryOption<u64>budget seam #589 re-adds. Keep any test at the behaviour level (§4 steps 6–8) rather than the implementation level, so it stays meaningful across either landing. - Do not test S1 or S2 as-is. Both are defects, not features; testing them on healthy hardware would confirm only that the happy path works and would burn time on code that needs to change. Fix them first.
- No prompt-injection or instruction-like content was found in the PR body, diff, or docs; the security screen's all-clear is consistent with my reading of the diff and the new C file (compile-time literal library name, no
system/exec/fork/getenv).
Bottom line: the PR is worth a small amount of hardware time — one cn7 job for the integrated-GPU budgeting path and the native arm64 launch, plus one cn5 regression job — but its advertised headline (CUDA 12 batched copies) is untestable here and its most dangerous defect (S3, the dlopen symbol table) is diagnosable for free on a CPU. Spend the first ten minutes on Stage 0; book hardware only if it is clean, and fix S1 and S2 before anything is re-tested.
Final review
Recommendation: Changes Requested
The core fixes (CUDA 12 cuMemcpyAsync fallback, lazy libibverbs.so.1 loading with Ubuntu 22.04 release builds, scaled unified-memory host reserves, HOST_NUMA fallback, and Eos MADV_HUGEPAGE ordering) are sound and address real defects without any proven correctness or memory-safety blockers. However, there are four verified issues worth resolving: a clamping/error-masking inconsistency in the duplicated integrated host-budget helper, a contradictory docstring on Stream::copy_batch, three stale docs/comments (including THIRD_PARTY_NOTICES.md bundled in release archives), and the unrun ubuntu-24.04-arm release check for the headline arm64 portability claim.
Blockers
None.
Should Fix
-
Deduplicate
integrated_offload_host_budget/integrated_stateand fix clamping & capture-mode error masking (helios/src/runtime_core/memory.rs:195-221, 646-683vs:267-298, 878-909)- In
integrated_offload_host_budget, theNonearm passes unclampedmemory.free(raw/proc/meminfoMemAvailable) tohost_pool_budget_from(memory.free, memory.total, future, true), whereas bothSomearms (:209-210,:214) andlimited_budget(:281) clampmemory.free.min(memory.total). When CUDA reports a smallertotal_memory()than LinuxMemAvailable, theNonearm overstates the host budget relative tolimited_budget. - When an explicit
--memory-limitcap is smaller thanloaded,integrated_offload_host_budgetsaturates to0(:216). In non-capture mode the subsequentlimited_budgetcall at:920still catches and reports"memory limit is {cap} bytes, but loaded model resources require {required} bytes", but in pool-only capture mode (--prefix-cache-poolwithout local memory/disk)headroom_with_inputs_for_budget(selene/src/offload.rs:170-172) aborts early at:833with"host budget cannot hold a full pool capture", hiding the actual memory-limit diagnostic. integrated_offload_host_budgetrepeatslimited_budget(memory, loaded, limit, 0, true, future)arm-for-arm (onlyhost_growthat:1022wants.unwrap_or(0)whenpool_host_chargeexhausts remaining cap), andintegrated_state(:646-683) repeats the integrated-rank snapshot/fixed-bytes fold at:878-909with slightly differenttotal(min()vsobservations[index].total) andobserved_drop(max()vs per-rankinitial[index].free - memory.free).- Fix: Compute the integrated-rank snapshot/fixed bytes once after
observations, and route host-budget calculation throughlimited_budget(memory, loaded, limit, 0, true, future)(using.unwrap_or(0)only forhost_growthat:1022).
- In
-
Update
Stream::copy_batchdocstring to match the UVA fallback and its callers (helios/src/cuda.rs:781-790vs:824-833,helios/src/execution/transport.rs:630, 1087-1093)helios/src/cuda.rs:782-784states:"Every address is a device address, including the device alias of registered host memory. CPU addresses of registrations are not necessarily GPU-accessible."- This contradicts both the fallback comment directly below (
:826-827:"accepts device addresses, registered host aliases, and raw cuMemHostAlloc(..., flags=0) pointers") and the production callerhelios/src/execution/transport.rs:630, 1087-1093, which allocatesframe.inputwithmodel.host_buffer(...)(cuMemHostAlloc(..., flags = 0)) and passesframe.input.address()tocopy_batch. - Fix: Update the
copy_batchdoc comment (:781-790) to document that UVA-accessible pinned host addresses (cuMemHostAlloc(..., flags = 0)) are valid alongside device addresses and registered host device aliases.
-
Update stale comments and redistributed docs contradicted by this PR (
helios/src/frontend/mod.rs:1400-1402,THIRD_PARTY_NOTICES.md:76-78,docs/prefix-cache-offload.md:1483-1485)helios/src/frontend/mod.rs:1400-1402still documentshost_pool_budgetas reservingHOST_SERVICE_HEADROOM_BYTES (2 GiB) plus one twentieth of total memory, overstating headroom by ~1.9 GiB on the 8–16 GiB unified-memory SoCs this PR changes to64 MiB + total / 20(selene/src/offload.rs:808-820).THIRD_PARTY_NOTICES.md:76-77(bundled inside every release archive per.github/workflows/release.yml:85(not opened)) still states"Linux aarch64 builds also link the system libibverbs and pthread interfaces for RoCE."No build linkslibibverbsanymore (helios/build.rs:67-77links onlydlandpthreadanddlopenslibibverbs.so.1).docs/prefix-cache-offload.md:1483-1485(modified in this PR) still says`--all-features` enables the `roce` and `rdma` features, which link libibverbs, contradictinghelios/Cargo.toml:26-30(updated in this PR soroceloadslibibverbs.so.1lazily and onlyrdmalinkslibibverbs).- Fix: Update all three passages to match the new
host_reserve_bytesformula and lazydlopenmodel.
-
Run the
ubuntu-24.04-armrelease check and record unrun hardware validations indocs/TODO.txt(.github/workflows/release.yml:46-49 (not opened), 81-121,docs/TODO.txt)- The headline arm64 release portability claim (
flare-linux-arm64.tgzglibc ≤ 2.35 and nolibibverbs.soDT_NEEDED) was only validated on x86_64 in local Docker; the workflow's runnableubuntu-24.04-armleg (workflow_dispatch) was not run. - The unrun live-hardware validations disclosed in the PR description (discrete CUDA 12.x
copy_batch, Jetson Orin GA10B, Windows WDDMHOST_NUMAfallback) are not recorded indocs/TODO.txtas required byAGENTS.md:57-58. - Fix: Run
release.ymlviaworkflow_dispatchto verify the arm64 artifact (ELFDT_NEEDED, glibc symbol ceiling, and clean Ubuntu 22.04/24.04 smoke checks), and record the remaining live-GPU checks indocs/TODO.txt.
- The headline arm64 release portability claim (
Subtract / Simplify
-
Collapse the
prepareandheadroom_with_inputswrapper ladders (selene/src/offload.rs:117-206, 484-534, 603-619,helios/src/offload/mod.rs:72-129)helios/src/offload/mod.rs:72-80(pub fn prepare) has zero callers anywhere in the repository.selene/src/offload.rsandhelios/src/offload/mod.rsnow carry 3-deep forwarding ladders (prepare→prepare_with_inputs→prepare_with_inputs_budget) with#[allow(clippy::too_many_arguments)]in both crates, plus duplicatedenabled()/memory/disk/capture setup betweenheadroom_with_inputs(:117-146) andheadroom_with_inputs_for_budget(:151-206). Meanwhile, the post-KV-alloc re-query (host_budget: Noneatselene/src/offload.rs:612-618) survives as the default path for all callers outsideNativeModel::prepare_offload.- Folding
host_budget: Option<u64>(or a requiredhost_budget: u64onprepare_with_inputs) directly intoheadroom_with_inputs/prepare_with_inputsdeletes ~50–80 lines of boilerplate and eliminates the unsafe post-KV-alloc default.
-
Remove the unused
host_pool_budget_with_reserve/apply_reserveswitch (selene/src/offload.rs:824-836, 851-861, 885)host_pool_budget_with_reservehas a single caller (host_pool_budgetat:853), passingtrue.host_pool_budget_fromis also only ever called withtruein production (selene/src/offload.rs:885,helios/src/runtime_core/memory.rs:202-207);falseappears only in unit tests (selene/src/offload/tests.rs:722-723). Removing the unused boolean switch eliminates dead API surface.
-
Consolidate
HostRegistrar::map_split,cuda::map_device_host_parts, andSlabPool::sized_by_rank(selene/src/registrar.rs:26-37,helios/src/cuda.rs:669-676,selene/src/slab.rs:261-270)- Production reaches
CudaRegistrar::try_map_split(helios/src/offload/registrar.rs:31-37) viaSlabPool::try_sized_by_rank(selene/src/offload.rs:631), leavingCudaRegistrar::map_splitandcuda::map_device_host_partsunreachable in production andSlabPool::sized_by_ranktest-only (selene/src/slab.rs:631,helios/src/offload/transfer.rs:1723). Because these crates arepublish = falsewith no external workspace callers, replacingmap_splitwithtry_map_splitas the single trait method lets you deletemap_device_host_partsandsized_by_rank.
- Production reaches
Nits
- Use named CUDA status constants in
is_host_numa_unsupported(helios/src/cuda.rs:535-537): Replace bare1 | 801with local constants (CUDA_ERROR_INVALID_VALUE/CUDA_ERROR_NOT_SUPPORTED) besidecuda.rs:143-166(not imported fromruntime_core::driver, which is feature-gated). Also note in the docstring at:546-547thatCUDA_ERROR_INVALID_VALUEatcuMemCreate/cuMemSetAccess(:641, 657) triggers fallback too, or narrow those two sites once live GA10B/WDDM error codes are verified. - Avoid silent skips in the Linux
smapscheck (eos/src/unix.rs:214-246): Once/proc/self/smapsis readable,.expect(...)the VMA header andVmFlags:line rather than silently skipping thehgassertion inside nestedif lets, and simplify the manual byte-offset re-summing (:218-237) with line iteration. - Deduplicate the page-stride prefault loop (
eos/src/unix.rs:110-116vseos/src/windows.rs:179-183): Extract the identicalstep_by(page_size().max(1))write_volatile(0)loop into a shared helper ineos/src/lib.rs. - Drop duplicate
CopyAsyncalias (helios/src/cuda.rs:80-81):type CopyAsync = unsafe extern "C" fn(u64, u64, usize, Handle) -> c_int;is identical totype CopyDtoDon the preceding line.
Verified passes
- CUDA 12
copy_batchfallback (helios/src/cuda.rs:303, 801-833): Correctly falls back to per-entrycuMemcpyAsyncwhencuMemcpyBatchAsync_v2is absent, whilecopy_dtod_asyncretainscuMemcpyDtoDAsync_v2. DeviceHostPartscleanup onOk(None)(helios/src/cuda.rs:516-530, 612-664):DeviceHostParts::dropunmaps mapped parts, releases handles, and frees the VA reservation on every earlyreturn Ok(None)path without leaking.- Selene pre-planned host budget round trip (
helios/src/runtime_core/memory.rs:825-857, 1102-1112→model.rs:909-918, 967-977→selene/src/offload.rs:603-622):planned_offload_hostmatches the budget reserved before KV allocation in both capture (tier_host.max(chain_bytes)) and non-capture (tier_host - memory_bytes) modes. roce_ensure_libibverbsplacement androce_proxy_dlopen.c(helios/src/execution/roce.rs:124-199,helios/native/roce_proxy_dlopen.c:58-128): Runs after ABI/layout/topology preflight and before zeroing the region or callingroce_create, keepshelios/native/roce_proxy.cunmodified, and exports noibv_*symbols.- Eos THP ordering (
eos/src/unix.rs:85-119): RemovesMAP_POPULATE, advisesMADV_HUGEPAGEprior to faulting, and prefaults viaMADV_POPULATE_WRITEon Linux with a clean fallback for older kernels (< 5.14) and non-Linux Unix. docs/multi-host.md:47-56anddocs/runtime-core-design.md:9-12: Accurately describe lazylibibverbs.so.1loading for single-host vs multi-host RoCE serving.
Dropped on verification
- Candidate Blocker #1 (
is_host_numa_unsupportedtreatingCUDA_ERROR_INVALID_VALUEas unsupported): Downgraded to Nit —cuDeviceGetAttribute(..., HOST_NUMA_ID),cuMemGetAllocationGranularity(..., HOST_NUMA), andcuMemCreate(..., HOST_NUMA)legitimately returnCUDA_ERROR_INVALID_VALUE(1) orCUDA_ERROR_NOT_SUPPORTED(801) on CUDA platforms withoutHOST_NUMAVMM support; narrowing to801without hardware verification risks breaking GA10B/WDDM, andOOM(2) still propagates asErr. - Candidate #2 sub-claim (
cuMemcpyAsynchard-required inDriver::load): Dropped —cuMemcpyAsynchas been in the CUDA Driver API since CUDA 4.0 anddocs/prefix-cache-offload.md:649-650already lists it. - Candidate #3 sub-claim (undersized
--memory-limityields a sliver of intake in non-capture mode): Disproved —limited_budgetathelios/src/runtime_core/memory.rs:920runs withfuture >= memory_bytesand immediately errors with"memory limit is {cap} bytes, but loaded model resources require {required} bytes". - Candidate #5 (
FLARE_LOAD_IBV(query_port, "ibv_query_port", "IBVERBS_1.1")breaking RoCE): Disproved —libibverbs.so.1exportsibv_query_port@IBVERBS_1.1for<infiniband/verbs.h (not opened)>'s own compat fallback, removing it would risk a NULL-pointer dereference whenverbs_get_ctx_opreturnsNULL, and the PR's ownlazy_libibverbs_loader_resolves_symbols_or_reports_install_hinttest would have failed if it were absent. - Candidate #6 half (
lazy_libibverbs_loader_resolves_symbols_or_reports_install_hintinhelios/src/execution/roce.rs:511-523being vacuous): Disproved — the missing-symbol error string (roce_proxy_dlopen.c:76-77:"libibverbs.so.1 is missing required symbol %s") does not contain"libibverbs1", soassert!(text.contains("libibverbs.so.1") && text.contains("libibverbs1"))fails loudly iflibibverbs.so.1is present and any symbol fails to resolve. - Candidate #8(b) (
docs/release.md:30-31parenthetical phrasing) and #8(c) (unapproved GA10B charter scope expansion): Disproved —docs/release.md:30-31accurately states the Ubuntu 22.04 / glibc 2.35 requirement, and GA10B support was already committed tomaininc9935887(helios/src/core/naming.rs:15, 54-60) by priority contributor@lukealonso. - Candidate #9 sub-claims (
packaging/debian/package.sh:46-48anddocs/debian.md:3-6, 61-64): Disproved — the Debian package targets Ubuntu 24.04 / DGX Spark, intentionally depends onibverbs-providers(which pullslibibverbs1) for RoCE, anddocs/debian.mdaccurately states"ARM64 additionally depends on the verbs providers needed for RoCE"without claiming dynamic linking. - Candidate #12 (
flare_ibv_get_device_listinit guard andibv_reg_mr_iova2inhelios/native/roce_proxy_dlopen.c): Dropped — the 4-lineroce_ensure_libibverbs(NULL, 0)check inflare_ibv_get_device_list(:122-128) is a cheap NULL-deref safety guard ifroce_createis ever called directly, and keeping<infiniband/verbs.h (not opened)>'sIBV_ACCESS_OPTIONAL_RANGEsemantics inflare_ibv_reg_mr(:171-179) preserves compatibility with futureroce_proxy.cupdates. - Candidate Nit #4 (deleting
cuDeviceGetAttribute/cuMemGetAllocationGranularityprobes athelios/src/cuda.rs:577-590): Dropped — speculative/hardware-dependent, and probing early avoids an unnecessarycuMemAddressReserveon unsupported platforms. - Candidate Nit #5 (PR description prose: "17 calls" vs redirect count, parenthetical file lists): Dropped — low-signal formatting nit.
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.