Final review report · NVIDIA/hyperflare-inference #397

Raw Markdown for agents: https://autobot.eidonix.com/p/5ed6b25e-6a34-4b22-8bd4-813e39291753.md

Recommendation: Changes Requested

The field failure on stock GB10 hosts running driver 580.178.04 is real and independently confirmed, but this patch cannot merge as written. None of the three blocking items from @yatesdr's 2026-11-20 review are resolved at head b49b367: the root cause on the failing CUDA 13.0 user-mode driver is still unproven (the 2026-11-26 probe ran on driver API 13020 / CUDA 13.2 where SetAttribute(11, all-zero) returns 0 and never triggers the guard), the skip condition still swallows any non-zero CUDA error across all nine admitted attribute ids, and zero tests exercise the new branch. This exact pattern—suppressing an unexplained driver error in the loader instead of diagnosing and fixing the root cause—is explicitly prohibited by the project charter (which cites #397) and AGENTS.md:177-182.

Merge Risk

Level: High

Walkthrough

Pre-merge Checks

Blockers

  1. Over-broad error suppression masks all CUDA error codes and all nine attribute ids (helios/src/runtime_core/mod.rs:892-901, helios/src/runtime_core/format.rs:570-579).

    • Verified behavior/impact: if status != 0 && value.iter().all(|word| *word == 0) intercepts every non-zero CUDA status—including context-fatal and resource errors such as CUDA_ERROR_OUT_OF_MEMORY (2), CUDA_ERROR_NOT_INITIALIZED (3), CUDA_ERROR_DEINITIALIZED (4), CUDA_ERROR_INVALID_CONTEXT (201), CUDA_ERROR_ILLEGAL_ADDRESS (700), CUDA_ERROR_LAUNCH_FAILED (719), and CUDA_ERROR_CONTEXT_IS_DESTROYED (909)—across all nine attribute ids admitted by validate_node ([1, 2, 4, 5, 8, 9, 10, 11, 14], format.rs:572). Because heliopause/src/export/capture.rs:857-887 zero-fills unset attributes (unwrap_or([0; 8])) for ids 1, 2, 4, 5, 8, 9, 10 (and 11 when attribute_11 == true), almost every kernel node in every exported core hits the all-zero check. Instead of failing fast via driver.check (helios/src/runtime_core/driver.rs:177-199) and allowing NativeModel::parallel (helios/src/runtime_core/model.rs:876-900) to surface the exact failing call and tear down cleanly across ranks, the loader continues into cuGraphAddDependencies_v2, cuGraphInstantiateWithFlags, and cuGraphUpload (mod.rs:999-1046), misattributing failures or instantiating graphs with silently dropped launch attributes.
    • Fix: Do not add a blanket status != 0 / all-id skip. Either remove the loader workaround entirely (see Subtract / Simplify below) or—only after establishing the root cause and getting maintainer sign-off—narrow any tolerance strictly to the proven (attribute.id, status) pair (e.g., attribute.id == 11 && status == 1 && value.iter().all(|word| *word == 0)), leaving every other id and every other CUDA status fatal.
  2. Root cause on the failing host driver remains unproven; probe tested driver API 13020 instead of the failing CUDA 13.0 UMD (Charter #397, AGENTS.md:177-182, unresolved @yatesdr Blocking #1).

    • Verified behavior/impact: The field failures occur on host driver 580.178.04 (CUDA 13.0 UMD, driver API 13000) with status=1 (CUDA_ERROR_INVALID_VALUE). The author's 2026-11-26 probe ran inside the pilcothink/flare_spark:pre-0.2 (CUDA 13.2.51) container against driver API version 13020 (CUDA 13.2), where cuGraphKernelNodeSetAttribute(11, all-zero) returned 0—so the probe never reproduced the status=1 rejection and never entered the guard. This matches #2, where two GB10 reporters on 580.178.04 cleared the identical cuGraphKernelNodeSetAttribute failed (1, CUDA_ERROR_INVALID_VALUE) failure simply by loading CUDA 13.2/13.3 forward-compat user-mode libraries (595.58.03 / 610.43.02) over the 580 kernel module. Without reproducing status=1 on the failing host libcuda.so, it is still unknown whether host R580 rejects attribute id 11 itself (in which case GetAttribute(11) would also return 1, matching heliopause/src/export/capture.rs:554-556) or rejects the zero value on SetAttribute(11), and whether an official Flare-released core reproduces it.
    • Fix: Run the probe directly against the failing host libcuda.so (outside the container's compat UMD, reporting cuDriverGetVersion and loaded libcuda.so path) for GetAttribute(11), SetAttribute(11, zero), and SetAttribute(11, valid), and test a core exported by an official Flare build on SM121/SM120 as requested in @yatesdr's review. That result determines whether the right fix is an export-side omission, a driver/compat-library diagnostic, or a narrowed loader rule.
  3. No test exercises the new branch (AGENTS.md:189-192, unresolved @yatesdr Blocking #3).

    • Verified behavior/impact: Zero tests were added or modified. Existing attribute replay tests (helios/tests/cooperative_core_fixture.py:102-112, helios/src/runtime_core/cooperative_tests.rs:41-81) only test attribute id 2 with a non-zero payload (1). The reported cargo test --lib run does not execute prepare_graphs or either branch of the new guard.
    • Fix: Add focused test coverage for whatever narrowed behavior survives root-cause analysis—verifying both the tolerated case and that rejected non-zero payloads (and unrelated statuses/ids) still abort loading.

Should Fix

  1. Raw eprintln! in parallel prepare_graphs violates StartupProgress silence contracts, lacks rank attribution, and corrupts terminal redraws (helios/src/runtime_core/mod.rs:985-990, helios/src/runtime_core/model.rs:741-745, 878-888, helios/src/startup.rs:172-188, 303-325, 534-581).

    • Verified behavior/impact: prepare_graphs runs concurrently across flare-load-{index} rank threads (model.rs:878-888) while StartupProgress's animation thread redraws the terminal banner every 125 ms using cursor-relative ANSI escapes (\x1b[{}A using self.drawn_lines, startup.rs:571-580). Unsynchronized eprintln! writes from loader threads do not hold StartupProgress's output mutex and do not update drawn_lines, causing banner corruption on terminals; they also bypass StartupProgress::silent()/observed() (startup.rs:172-188, helios/README.md:114-115) used by embedded Rust sessions, and omit the rank index (which model.rs:885 only attaches on Err).
    • Fix: If any load-time warning survives, do not write raw eprintln! inside prepare_graphs. Return/accumulate the diagnostic into the load result or emit it through a synchronized, silence-respecting startup reporting path that includes the rank index. (Note: phase.detail(...) at startup.rs:375-378 is overwritten on every call and replaced by phase.finish(format!("concurrency {active}")) at model.rs:745, so it is not suitable for a persistent warning.)
  2. Undocumented change to the core-loading contract (docs/runtime-core-design.md:769-778, 896-911).

    • Verified behavior/impact: docs/runtime-core-design.md:769-778 documents cooperative grid clamping (CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE) as the sole load-time attribute tolerance and states that unrecoverable cases reject loading; Limitations (:896-911) lists no attribute-skip tolerance.
    • Fix: If a narrowed loader-side tolerance is approved after root-cause verification, document its exact trigger, scope, and behavioral impact in docs/runtime-core-design.md.
  3. Rebase onto main without regressing #430's green-context cooperative clamp (helios/src/runtime_core/mod.rs:1002-1017 on main).

    • Verified behavior/impact: main now selects (graph_context, upload_stream, partition_sms) per graph (main:894-912) and clamps cooperative launches when status == 720 || (status == 0 && partition_sms.is_some()) (main:1002-1016). Rebasing the PR hunk onto main must preserve the full clamp condition and place any subsequent check strictly after it.

Subtract / Simplify

  1. Delete all 20 lines in helios/src/runtime_core/mod.rs and fix at the right layer once root cause is confirmed.

    • Export layer (heliopause/src/export/capture.rs:542-579, 857-870): The exporter already special-cases id == 11 when cuGraphKernelNodeGetAttribute(11) returns status == 1 (capture.rs:554-560) and already omits all-zero id == 14 in encode_kernel (capture.rs:868-870: if id == 14 && value.iter().all(|&v| v == 0) { continue; }). If root-cause analysis confirms zero-valued id == 11 is a no-op that older replay drivers reject, extending capture.rs:868 to omit all-zero id == 11 stops emitting the problematic zero record in ~1 line—avoiding any silent error suppression in the loader.
    • Diagnostic layer (helios/src/runtime_core/mod.rs:901): For already-exported cores on stock 580 hosts (which #2 showed load cleanly with CUDA 13.2+ forward-compat libraries), improving the driver.check operation string on cuGraphKernelNodeSetAttribute to include the graph name, node index, attribute id, and loaded driver version (matching the cuGraphAddKernelNode_v2 context at mod.rs:860-865 and the request in #2) makes the compat-library remedy immediately obvious without weakening load validation.
  2. Eliminate the per-graph BTreeMap<(i32, i32), u64> and post-loop print (helios/src/runtime_core/mod.rs:790-794, 985-990).

    • The (id, status) map only exists because the guard is over-broad across ids and statuses, and printing only at :985-990 after the node loop means nothing is printed if any node aborts mid-loop (e.g., at :901). Deleting the loader guard (or narrowing to a single id/status with a single per-load summary) removes 12 lines of unnecessary state and eliminates the mid-loop abort blind spot.
  3. Remove the unproven causal comment (helios/src/runtime_core/mod.rs:893-896).

    • "Drivers reject kernel-node attributes added after their CUDA release. A zero-valued attribute carries no behavior..." states an unverified cause as settled fact in shared replay code. Delete it alongside the broad guard.

Nits

Dropped on verification