Pre test report scratchpad · NVIDIA/hyperflare-inference #589

Raw Markdown for agents: https://autobot.eidonix.com/p/a5943e1a-3bda-4f84-a34a-3e3b529c7467.md

#1 [high] PR #589 — verified code facts (my own reads)

PR #589 (lukealonso, merged 2026-11-28, head aed8039, base main; +994/−133, 21 files). Already merged; base commit branch v042-jetson-tarball-vlm-cuda12.

VERIFIED BY ME (file:line at PR head):

  1. CUDA copy fallback: helios/src/cuda.rs 801-822 uses memcpy_batch when present; 824-833 new fallback loops copy_async (cuMemcpyAsync) per entry. copy_async: symbol!("cuMemcpyAsync") at cuda.rs:303 → REQUIRED entry point (symbol! macro 239-248 returns Err), so a driver lacking it fails Driver::load, not the copy. memcpy_batch at 282-285 is library.get(...).ok() = OPTIONAL, so fallback selection is purely "is cuMemcpyBatchAsync_v2 exported". There is NO env var / feature flag / test seam to force the fallback (grep FLARE_*, std::env::var in cuda.rs: only FLARE_OFFLOAD_TEST_DIR at 1445/1693). ⇒ On a CUDA 13 driver the new branch is unreachable. cn5 = RTX PRO 6000 Blackwell (sm_120) and cn7 = GB10 (sm_121) both require CUDA 13.x drivers, which export cuMemcpyBatchAsync_v2. So the PR's headline fix (#1) CANNOT be exercised on our hardware.
  2. is_host_numa_unsupported(status) = matches!(status, 1 | 801) at cuda.rs:535-537, applied at 4 sites inside try_map_device_host_parts: 579 (cuDeviceGetAttribute), 587 (cuMemGetAllocationGranularity), 642 (cuMemCreate), 658 (cuMemSetAccess); each returns Ok(None) → selene/src/offload.rs 627-638 falls back to SlabPool::sized + cuMemHostRegister_v2. Doc at cuda.rs:539-547 claims "real failures (such as out-of-memory) return Err" — overstated. NUANCE worth reporting: ATTRIBUTE_HOST_NUMA_ID = 134 (cuda.rs:150) is CUDA 12.2+; an older driver legitimately returns CUDA_ERROR_INVALID_VALUE for an unknown attribute, so status-1 is defensible for cuDeviceGetAttribute/granularity but NOT for cuMemCreate/cuMemSetAccess. Address reserve (cuda.rs:609-611) still hard-errors, so a non-HOST_NUMA platform can also Err depending on which call reports first.
  3. RoCE dlopen shim helios/native/roce_proxy_dlopen.c 84-100 hard-requires 17 symbols via FLARE_LOAD_IBV (macro 72-82: on NULL → snprintf "missing required symbol", dlclose, return → flare_ibv_ready stays 0). Line 89 requires plain ibv_query_port @IBVERBS_1.1. But the trampoline flare_ibv_query_port (146-154) is a reimplementation via verbs_get_ctx_op + struct _compat_ibv_port_attr*, i.e. the modern rdma-core inline form whose real exported symbol is the compat one. Server/roce.rs:192-195 turns any load failure into "RoCE transport setup failed: ..." → multi-host dead, single-host fine. UNRESOLVED: whether rdma-core exports unprefixed ibv_query_port to dlsym. Cheap to settle with nm -D in ubuntu:22.04 — no GPU needed.
  4. Vacuous test: helios/src/execution/roce.rs:511-523 asserts only inside if status != 0; on any host with libibverbs1 installed status==0 and the test asserts nothing. eos/src/unix.rs:207-248 likewise only asserts VmFlags "hg" inside 4 nested if-let/if-let-on-smaps.
  5. Budget plumbing verified consistent: memory.rs:825-840 computes initial_budget via host_budget_for then headroom_with_inputs_for_budget; planned_offload_host = tier_host − cfg.memory_bytes (1109) or tier_host.max(chain_bytes) for capture (1102-1107); threaded model.rs:909-918 → prepare_offload(967-977) → selene prepare_with_inputs_budget (522-534) → headroom_with_inputs_for_budget (151-206). No leak on early Ok(None) (Drop at cuda.rs:516-530).
  6. DUPLICATION w/ divergence: memory.rs:192-221 integrated_offload_host_budget vs 267-298 limited_budget. For MemoryLimit::Bytes/Fraction the new one does cap.saturating_sub(loaded+future) (→0) where limited_budget returns Err "memory limit is {cap} bytes, but loaded model resources require {required}". Also integrated_state min-total (657-661) vs observations[index].total (887), and max observed drop (674-680) vs initial[index] (904) — two live copies ~200 lines apart in the same function.
  7. Dead code confirmed: helios/src/cuda.rs:667-676 map_device_host_parts has no caller except CudaRegistrar::map_split (helios/src/offload/registrar.rs:27-29), and CudaRegistrar overrides try_map_split (31-38) which is what slab.rs:215 reaches; trait default selene/src/registrar.rs:32-37 is the only route to map_split. helios/src/offload/mod.rs:72 prepare has no caller at all. selene/src/slab.rs:261-270 sized_by_rank has test-only callers. selene/src/offload.rs:858-886 host_pool_budget_with_reserve flag only ever true in production (memory.rs:202-207, offload.rs:853) and false only in tests.rs:722-723.
  8. Stale docs confirmed verbatim: helios/src/frontend/mod.rs:1400-1402 still says "HOST_SERVICE_HEADROOM_BYTES (2 GiB) plus one twentieth"; THIRD_PARTY_NOTICES.md:76-78 still says "Linux aarch64 builds also link the system libibverbs and pthread interfaces"; docs/TODO.txt has zero matches for JetPack|Orin|GA10B|WDDM|aarch64|libibverbs while docs/release.md:30-31 claims JetPack 6 coverage.
  9. Scope confirmed: helios/build.rs:67-77 gates the dlopen shim only on #[cfg(feature="roce")] with NO target_arch gate → x86_64 --features roce builds also switch to dlopen (behaviour change not in the description). GA10B is pre-existing supported hardware (helios/src/core/naming.rs:15,54-57; ignition/planning.py:38 SM87), so the integrated-GPU budget fix is fixing support the project already committed to, not new hardware scope — this corrects the Architecture/Value reviewers' "charter Non-Goals" framing.
  10. release.yml diff verified: arm64 leg (ubuntu-24.04-arm, build-packages libibverbs-dev) existed before; continues to build inside ubuntu:22.04; adds readelf DT_NEEDED libibverbs check (92-95), GLIBC_>2.35 regex (96-107, GLIBC_ only, not GLIBCXX_), and clean ubuntu:22.04+24.04 smoke of flare --version/run|agent|orbit --help with no libibverbs1. No transport open anywhere in CI.

#2 [high] Hardware mapping — what cn5/cn7 can and cannot exercise

Available: cn5 = 4× RTX PRO 6000 Blackwell Max-Q (sm_120, discrete, 96 GiB each), amd64, 48 CPU/125 GiB/16 GiB scratch. cn7 = 1× NVIDIA GB10 (sm_121, integrated/unified memory), arm64, 10 CPU/60 GiB/16 GiB scratch.

Per changed behaviour:

Conclusion: 3 of the 4 headline claims map to preconditions our hardware does not satisfy. Residual hardware-testable surface = (a) integrated-GPU prefix-cache budgeting on cn7, (b) aarch64 build+packaging smoke on cn7, (c) generic regression on cn5 (pre-existing paths). No throughput A/B is warranted: no hot-path change — the copy fallback keeps the same sequential per-entry loop, and the budget change alters sizing not speed (only indirect: larger intake on small SoCs → possibly higher prefix hit rate).

#3 [high] Reachability analysis + review correction

CORRECTION to all six reviewer summaries (I checked the code): helios/src/execution/roce.rs:511-523 is NOT a fully vacuous test. The shim's three failure texts differ:

OPEN, cheap, CPU-only question raised by the Correctness reviewer: does rdma-core export plain ibv_query_port / ibv_reg_mr? In modern rdma-core these are static inline in verbs.h, with the real exports being ___ibv_query_port / ___ibv_reg_mr in IBVERBS_1.1 (plus possibly IBVERBS_1.0 compat symbols). flare_ibv_sym (c:50-56) tries dlvsym(IBVERBS_1.1) then falls back to plain dlsym, and the table field is typed struct _compat_ibv_port_attr* (c:27-28), i.e. the author expected the legacy 3-arg symbol. If neither version-map entry nor a default-version symbol named ibv_query_port/ibv_reg_mr exists, flare_ibv_init dead-ends and every RoCE transport open fails while single-host serving still works. Settle with objdump -T / nm -D libibverbs.so.1 inside ubuntu:22.04/24.04 — no GPU, no arm64 needed. Severity if true: multi-host RoCE completely dead. This is the cheapest high-value gate on the whole PR.

Reachability facts that bound any hardware test:

#4 [high] Findings ledger — severity adjudication

Finding severity ledger for the report (my adjudication of the six summaries, after reading code):

MUST FIX BEFORE ANY HW TIME (substantive, code quality/architecture):

  1. cuda.rs:535-537 is_host_numa_unsupported accepts status 1 (CUDA_ERROR_INVALID_VALUE) at 4 sites (579/587/642/658) → silent substitution of the allocation strategy for genuine argument errors. Charter: "Bug fixes need to address the root cause; don't just swallow...". 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, NOT at cuMemCreate/cuMemSetAccess. Recommended fix: narrow to 801 for create/access, keep {1,801} for the probes with that reason documented. Also cuda.rs:539-547's "real failures return Err" is only true for non-1/801.
  2. Dlopen shim symbol table (roce_proxy_dlopen.c:84-100) — unverified and potentially fatal for ALL multi-host RoCE. One-line-wrong, hard-fails 17-for-17 (macro at 72-82 returns on any miss). MUST be settled by objdump/nm before trusting any RoCE statement, and before any RoCE test.
  3. integrated_offload_host_budget (memory.rs:192-221) re-implements limited_budget (267-298) with divergent error semantics: explicit Bytes/Fraction cap that cannot hold loaded+future saturates to 0 (216) instead of raising "memory limit is {cap} bytes, but loaded model resources require {required}" (294-296). Operator-reachable silent under-sizing; also the duplicate-deletion target (~93 lines incl. test per Subtractive).

DEFER / NITS (do not gate hardware, do not test):

SCOPE (I disagree with 2 of 6 reviewers): GA10B/Orin is NOT new hardware scope — helios/src/core/naming.rs:15,54-57 lists ga10b as a platform and ignition/planning.py:38 advertises SM87. The integrated-GPU budget fix repairs support already on main, so the "charter Non-Goals / needs maintainer sign-off" charge is unfounded. The real scope problem stands: 4 unrelated outcomes in one PR (CUDA copy, release/dlopen, budgeting/HOST_NUMA, eos THP) — charter: "Keep each PR focused on one coherent outcome" — so a regression cannot be bisected.

MERGED STATUS: already merged (aed8039 → ba3afb13, 2026-11-28, same day, zero human review, while sibling PRs #497/#323 carried review rounds). Open #323 rewrites budget()/host_pool_budget() again; open #497 deletes selene::offload::prepare and removes the Option budget seam that #589 re-adds. → a re-test after either lands would be invalidated; note in the report that #589's test result has a short shelf life and that behaviour-level (not implementation-level) tests are the only durable choice.