Opened by a workflow run, Dec 1, 2026 1:15 AM EST. decide malicious: all_clear (100%): No malicious content found
explore
Author: lukealonso (COLLABORATOR, de facto owner of heliopause/src and the only prior author of cubin.rs; Discord: lukealonso) Motivation: Serving loads every exported cubin whole via cuModuleLoadData, so the thousands of kernels compiled into PyTorch/FlashInfer/CUTLASS modules — over 95% of them never launched by a captured graph — still cost RAM, load time and artifact size. Since export already knows which CUfunctions each graph captured, this PR drops the rest from the ELF. Scale: +937 / −5 in 2 files Proposal:
- Add
cubin::strip_and_prune(cubin.rs:355): strip debug, then attempt a full ELF64 rewrite to remove unreachable kernels, falling back to the stripped image on any non-standard layout. - Compute reachability from captured symbols, non-debug relocation targets,
.nv.callgraphedges andEIATTR_EXTERNS(0x0f), to a fixed point. - Preserve
.symtabslot indices (dead slots keep only binding bits), cascade-drop companion sections via sh_info (including.nv.constant*/.nv.shared.*/.nv.local.*without SHF_INFO_LINK), filter global.nv.infoand callgraph entries, compact strtab/section/program headers. - capture.rs passes each module's captured symbols and now enumerates globals from the pruned image instead of the raw one.
- Two new unit tests plus a passthrough test for standalone and no-PT_PHDR modules. Touches:
- heliopause/src/export/cubin.rs — hand-rolled ELF64 rewriting, no driver validation
- heliopause/src/export/capture.rs — unconditional export path, globals now read post-prune
- docs/core-format-design.md:380-381 — behaviour now contradicts it, not updated Related items:
- #394 Assemble temporary core payloads in the rank export workspace (open): same cubin staging path, non-overlapping lever
- #585 Accelerate native graph capture… (closed): flagged strip_debug's clone cost on the export path; this adds more per-module work
- #504 Add pure-CUDA GPU and CPU lossless KV compression (merged): the standalone kv_codec module depends on the empty-keep-set passthrough
- #642 skip unreferenced epilogue candidates in relocate_inductor (open): same goal one layer up
- #630 GB10 unified memory / KV budget vs page cache (open): same symptom class, unlinked
Link: https://github.com/NVIDIA/hyperflare-inference/pull/652
Autobot comments: Beyond the description: pruning silently never happens if any captured symbol lacks a
.text.<name>section (cubin.rs:452-457) or if there are not strictly more text sections than kept functions (cubin.rs:434-436) — a likely explanation for only 35 of 123 modules pruning;.symtabbytes are never reclaimed;p_alignis hardcoded to 8 (cubin.rs:883); the rewritten ELF is only re-parsed, never loaded, so corruption surfaces at serving time. No CI workflow runs heliopause tests or exposesstrip_and_prune, so the "223 tests" are manual-only; all performance and memory numbers, and hardware validation, are SM87-only, while the charter's target matrix is SM103/120/121. Docs (core-format-design.md:380-381, runtime-core-design.md:76) still describe the old behaviour. Zero comments, reviews, labels or CI results.
Value Proposition
Value Proposition — PR #652 (heliopause: prune unreferenced kernels from exported CUDA ELF64 cubins)
1. Charter alignment — aligned, and in the right layer.
The work lives in the export path (heliopause/src/export/cubin.rs, capture.rs), not in Helios scheduling/requests: no wire-format, protobuf, runtime, CLI, dependency or Cargo change, no per-model branches, no flags. That matches "keep the runtime small and model-agnostic" and "smallest footprint in shared code." The symptom is real in-repo: every module cubin is loaded whole via driver.module_load (helios/src/runtime_core/mod.rs:790-799), with ambient evidence in #394 (32 SM120 cubins, 3,422,080 bytes) and #479 (9,488 kernels / 436.17 MiB cubin for 314 graphs). The charter's merge bar explicitly includes "a measured performance/memory issue," and the description follows the required four-part format. Author @lukealonso is a priority contributor and the de facto owner of this area (62 commits in heliopause/src over 180 days, sole prior toucher of cubin.rs), which carries extra weight per #229.
2. Novelty & status — genuinely additive, neither obsolete nor superseded.
No merged commit fixes this; items_touching(heliopause/src/export/cubin.rs) returns nothing else in 180 days, and only this PR adds strip_and_prune. #646/#647 (same author, merged) are the base it builds on. #642 (open) attacks the same goal one layer up in Python with unrelated files; #394 touches the same export staging but for fsync avoidance. Nothing supersedes it.
3. Value vs. cost — real value, but the evidence and safety envelope are incomplete.
Benefit is concentrated where it matters most (memory-constrained devices: −287 MiB pre-cache, KV 15,488→32,768 tokens on Jetson Orin Nano 8 GB — a step-change, not a marginal one). Cost is one self-contained ~930-line ELF rewriter in export-only code, reviewed once by an area owner. Concerns are concrete, not stylistic: all numbers are unattached to any script/log/artifact; no CI lane runs the new tests (manual-only); all live validation is SM87, while the CUTLASS-heavy modules targeted are precisely the unverified SM120/121 case (charter line 21); the stated 35-of-123 prune rate sits alongside two silent, undocumented all-or-nothing fallbacks (cubin.rs:434-436, 452-457); p_align is hardcoded to 8 (cubin.rs:883); nothing loads the rewritten image through the driver at export time, so failures surface at serving load; and docs/core-format-design.md:380-381 / runtime-core-design.md:76 now contradict the code.
Verdict: Worth it with changes. Merge after (a) at least one SM120/121 export+serve run, (b) a reproducer artifact for the headline numbers and an explicit explanation of the 88 unpruned modules, (c) the cubin tests wired into a CI lane, (d) export-time driver validation of the pruned image and a documented rationale for p_align, and (e) the two docs updated.
Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Classify intake
Selected: triage:review, performance, area:memory, area:preparation
Threshold: 65%
Triage
- [✓]
triage:review: 98.9% -
triage:validation: 0.9% -
triage:design-review: 0.2% -
triage:investigate: 0.0% -
none: 0.0% -
triage:integration: 0.0% -
triage:partial: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Priority
-
none: 100.0% -
priority:P1: 0.0% -
priority:P2: 0.0%
Type
- [✓]
performance: 98.9% -
enhancement: 62.2% -
community: 37.8% -
duplicate: 3.3% -
bug: 0.8% -
documentation: 0.1%
Area
- [✓]
area:preparation: 88.1% - [✓]
area:memory: 83.5% -
area:packaging: 32.1% -
area:kernels: 29.4% -
area:caching: 1.2% -
area:orbit: 1.2% -
area:engram: 0.6% -
area:api: 0.4% -
area:scheduling: 0.4% -
area:selene: 0.2% -
area:rocenante: 0.1%
Model
-
model:inkling-small: 43.8% -
model:kimi-k3.1: 4.7% -
model:muse-glimmer: 2.9% -
model:qwen3.8-27b: 1.8% -
model:glm-5.3: 1.6% -
model:qwen3.8-flash-next: 1.2% -
model:deepseek-v4.1: 0.8% -
model:nemotron-3.5-bolt: 0.7% -
model:gemma4: 0.4% -
model:deepseek-v4: 0.3% -
model:mimo-v2.6: 0.2%
Apply Labels (Intake)
Applied: +triage:review, +performance, +area:memory, +area:preparation
Subtraction and simplicity
Subtraction/Simplicity/Conventions review of PR #652 (heliopause/src/export/cubin.rs +927/−1, capture.rs +10/−4). The diff adds no speculative machinery — no flag, config, env var, trait or Python surface — and the passthrough branches are justified by real layout variance, so AGENTS.md:188-193 is not violated. What is removable is code left behind inside the implementation:
- Duplicated debug-section predicate (high). The new
is_debug_section(cubin.rs:254-259) is byte-identical to the copy still inlined instrip_debug(cubin.rs:187-195): 5 lines to delete. - One 530-line function with a triplicated predicate (high).
try_prune_unused_kernels(cubin.rs:372-904) fuses gate, reachability, cascade, table rebuild and ELF emission; the same five-condition.text.*callee test appears at cubin.rs:512-517, 558-568 and 588-600. Split along its own comment headers plus onecallee_texthelper. - EIATTR record decoder duplicated with drifting failure policy (high). cubin.rs:305-311 (
return None) and :578-587 (break) decode the same fmt→length framing; onenvinfo()record iterator replaces both. - Three small ones (medium).
capture.rs:3282-3287rescansoutput.index.ranks[0].functionswhen the localfunctionsvec built atcapture.rs:3134already holds the same data;align_up(cubin.rs:282-289) reinventsusize::next_multiple_of, already used for padding atarchive.rs:209/io.rs:252(not opened); the discardedElf::parse(&pruned)?at cubin.rs:365 validates only its own output.
Explicitly not this lens: p_align == 8 hardcode and zero vaddr/paddr (correctness), docs drift at docs/core-format-design.md:380-381/docs/runtime-core-design.md:76 (documentation). No formatting/lint suggestions — the repo runs neither lane.
Open: whether the missing prune on 88 of 123 modules is the silent unmatched-name fallback (cubin.rs:452-457) or intended passthrough, and whether the keep-set duplication is deliberate coupling to the exported index.
Correctness and contracts
Review of PR #652 (heliopause: prune unreferenced kernels from exported CUDA ELF64 cubins, +937/−5) through the correctness/contracts/system-consequences lens. Six findings: four Major, two Minor.
Major: (1) the rewritten ELF is internally inconsistent for any cubin carrying a non-SHT_SYMTAB symbol table or a section whose sh_info the code does not recognise — those carry pre-compaction section indices that are never remapped (cubin.rs:145, 261-280, 426-431, 694-722, 849-856), and the codebase itself knows about kind 0x70000085. (2) Two all-or-nothing passthroughs disable pruning for an entire module with no log or counter — one captured symbol name without a matching .text. section (cubin.rs:451-457) or one module with no surplus .text sections (cubin.rs:434-436) — which likely explains the description's 35-of-123 pruned modules and is undocumented in the PR text. (3) The only validation of the output is a bounds-only Elf::parse (cubin.rs:365); the first real load is cuModuleLoadData on the serving host (helios/src/runtime_core/mod.rs:790-798), and no CI lane runs the heliopause tests, so all five cubin tests are manual-only. (4) All live evidence is SM87/AGX Orin while the change is unconditional (capture.rs:3288) for the charter's SM103/SM120/SM121 matrix — exactly the CUTLASS-heavy cubins the change targets.
Minor: design docs now contradict the code (docs/core-format-design.md:380-381 still promises symbol names are preserved; docs/runtime-core-design.md:76 still says debug stripping only), and per-module export-time peak memory roughly triples with no cost claim.
Verified sound: standalone/KV-codec passthrough, the switch to global_symbols(&exported), byte accounting, and the absence of any wire/proto/runtime contract change; no concurrency hazard in the module loop.
Open: whether the unpruned modules are intended passthrough or the silent fallback; whether p_align=8 reproduces NVIDIA's SM120/121 layout; whether a driver-load check at export time is feasible.
Final review
Recommendation: Changes Requested
This PR solves a real, well-scoped memory and load-time problem in the right layer (export-only, zero Helios runtime/wire/CLI changes), and the core design—preserving .symtab indices while compacting dead .text.* sections and companion metadata, and re-enumerating globals from &exported—is sound. However, direct verification of heliopause/src/export/cubin.rs at 9ea2491 uncovered two concrete ELF64/CUDA binary-corruption paths on valid cubins (.nv.merc.*/Mercury symbol tables and unrecognized non-zero sh_info, plus .nv.callgraph indirect-call/prototype subsections), an unsafe break in the EIATTR_EXTERNS walk, and zero CI or SM103/SM120/SM121 verification for an unconditional export-path binary rewriter. All technical blockers can be closed cleanly with small fail-safe passthrough guards and targeted unit tests, plus at least one SM120/SM121 export+serve validation pass.
Merge Risk
Level: Medium
- Blast radius: Unconditional binary ELF64 rewriting on every exported module (
heliopause/src/export/capture.rs:3288). Previously exported cores and the Helios runtime reader (helios/src/runtime_core/mod.rs:785-850) are untouched, and multi-rank export captures per-rank cubin resources independently (heliopause/src/export/core.rs:2013-2061). - Failure visibility:
strip_and_pruneonly self-checks its output with header/bounds-onlyElf::parse(&pruned)?(heliopause/src/export/cubin.rs:365,:69-107), so semantic ELF corruption passes export silently and surfaces only at serving time oncuModuleLoadData(helios/src/runtime_core/mod.rs:795-798). - Hardware & CI gap: No CI workflow runs
cargo testonheliopause, and all live validation was performed on SM87 while the charter's target architectures (SM103/SM120/SM121—where CUDA 12.8+/13.x Mercury sections and large CUTLASS/FlashInfer cubins live) were not exercised.
Walkthrough
heliopause/src/export/cubin.rs:254-370: Addsstrip_and_prune(wrappingstrip_debug, returning early for empty keep sets, and falling back to debug-stripped bytes onOk(None)) along with helpers for debug-section matching,sh_infosection-index classification, alignment padding, and filtering dead-symbol records out of global.nv.info(0x11/0x12/0x2f) and.nv.callgraph.heliopause/src/export/cubin.rs:372-904: Addstry_prune_unused_kernels, which gates on standardEM_CUDAzero-vaddr ELF64 layouts, computes transitive.text.*reachability from captured symbols plus non-debug relocations,.nv.callgraph, and per-function.nv.info.<fn>EIATTR_EXTERNS(0x0f), cascades drops across companionsh_infosections, rebuilds.shstrtab/.strtab/.symtab(zeroing dead slots in place to preserve symbol indices), and re-emits sections, section headers, andPT_PHDR/PT_LOADprogram headers.heliopause/src/export/cubin.rs:1032-1282: Adds two isolated in-memory unit tests covering dead-kernel pruning,.nv.callgraphandEIATTR_EXTERNScallee retention, non-SHF_INFO_LINK.nv.constant0.<fn>sh_inforemapping, global symbol survival, and standalone/no-PT_PHDRpassthrough.heliopause/src/export/capture.rs:3282-3315: Builds each module'skeep_functionsset fromoutput.index.ranks[0].functions, replacescubin::strip_debugwithcubin::strip_and_prune, and enumerates module globals viacubin::global_symbols(&exported)so pruned dead-kernel constant symbols are not queried or recorded.
Pre-merge Checks
- [PASS] Security / malicious screen: Export-only local ELF transformation; no external I/O, auth/signing changes, or suspicious patterns found.
- [PASS] Charter & value fit: Solves a real measured memory/load-time issue in the export layer with zero Helios runtime, wire-format, or per-model changes; priority contributor
@lukealonso. - [PASS] Related / duplicate / conflict check: No conflicting changes on
main; standalonekv_codecmodules pass through via the empty-keep_functionsbranch (capture.rs:3282-3288,cubin.rs:360-362). - [WARN] Tests & verification evidence: Unit tests are isolated and clean, but no CI workflow runs
heliopausetests (tests/preparation/test_cubin.pyonly exercisesstrip_debug/global_symbols), and live export+serve validation was run only on SM87 rather than the charter's SM103/SM120/SM121 matrix (docs/design-review.mdPrinciples 4 & 12).
Blockers
-
Mercury (
.nv.merc.*/0x70000085) sections and unrecognized non-zerosh_infosilently corrupt pruned cubins (heliopause/src/export/cubin.rs:145,:412-432,:674-734,:790-792,:849-856).- Verified behavior & impact: The file already recognizes CUDA Mercury symbol tables (
s.kind == 0x70000085) atcubin.rs:145, andtests/preparation/test_cubin.py:14,35explicitly models.nv.merc.symtab(kind = 0x70000085,flags = 0x10000000,sh_link = .strtab). However,try_prune_unused_kernels's layout gate (cubin.rs:412-432) only checksSHT_SYMTAB(2). When a cubin contains.nv.merc.symtab(standard on Blackwell SM100/SM103/SM120/SM121 toolchains), pruning compacts.strtab(cubin.rs:674-734) and renumbers sections (cubin.rs:652-659), while copying.nv.merc.symtabverbatim (cubin.rs:790-792) and remapping itssh_link(cubin.rs:841-848). Every entry in.nv.merc.symtabis left with stale pre-compactionst_shndx(pointing to wrong sections or paste_shnum) and stalest_nameoffsets into the compacted.strtab. Similarly,cubin.rs:849-856copiess.inforaw for any surviving section not matched bysh_info_is_section(cubin.rs:261-280), leaving stale section indices on any unrecognized companion section that omitsSHF_INFO_LINK. - Fix: In the layout gate (
cubin.rs:412-432), bail toOk(None)(passthrough) if any section hass.kind == 0x7000_0085(or Mercury section kinds0x7000_0080..=0x7000_00ff/SHF_CUDA_MERCURY0x1000_0000/ name prefix.nv.merc). In the section-header emitter (cubin.rs:849-856), ifs.info != 0on a surviving section that is neitherSHT_SYMTAB,.text.*, nor recognized bysh_info_is_section, returnOk(None)instead of passings.infothrough raw. Add unit tests covering both cases.
- Verified behavior & impact: The file already recognizes CUDA Mercury symbol tables (
-
.nv.callgraphprototype and indirect-call subsections (0xfffffffe/0xfffffffd) leave dangling.strtaboffsets and mis-filter entries (heliopause/src/export/cubin.rs:330-347,:522-537,:674-722).- Verified behavior & impact: NVIDIA's
.nv.callgraphgroups 8-byte(a, b)records into subsections headed by(0, marker)sentinels:(0, 0xffff_ffff)introduces(caller_sym, callee_sym)pairs, whereas(0, 0xffff_fffe)(CG_PROTO) and(0, 0xffff_fffd)(CG_ICALL) introduce(sym_idx, strtab_offset)pairs wherebis a byte offset into.strtab, not a symbol index. Currently: (a).strtabcompaction (cubin.rs:674-722) retains only strings referenced by surviving.symtabst_name, deleting prototype strings and shifting offsets, leaving dangling/out-of-bounds.strtaboffsets in.nv.callgraph; (b)filter_callgraph(cubin.rs:340) checksdead_syms.contains(&(b as usize)), treating a.strtabbyte offset as a symbol index and dropping live prototype/indirect-call entries whenever the offset numerically collides with a dead symbol index; and (c) reachability (cubin.rs:532) does not follow indirect-call prototype matches. - Fix: In
.nv.callgraphparsing (cubin.rs:522-537) andfilter_callgraph(cubin.rs:330-347), bail toOk(None)(passthrough) whenever a non-direct-call sentinel appears (any(a, b)witha == 0 && b != 0xffff_fffforb >= 0xffff_fff0 && !(a == 0 && b == 0xffff_ffff)), or explicitly parse the subsections and preserve/remap referenced.strtabprototype strings. Add a unit test covering(0, 0xffff_fffe)/(0, 0xffff_fffd)passthrough.
- Verified behavior & impact: NVIDIA's
Should Fix
-
Unsafe
breakon unrecognized/malformed.nv.info.<fn>records inEIATTR_EXTERNSwalk (heliopause/src/export/cubin.rs:577-587).- While
filter_global_nvinfo(cubin.rs:301-315) returnsNone(safe passthrough) on unknownfmtor out-of-boundsrec_len, the per-function.nv.info.<fn>reachability loop (cubin.rs:580-587) usesbreak. Truncating the walk early can miss a subsequentEIATTR_EXTERNS(0x0f) record and drop a live callee. - Fix: Extract a single EIATTR record-framing parser/iterator shared by
filter_global_nvinfoand theEIATTR_EXTERNSwalk, and returnOk(None)on any unknownfmtor truncated record.
- While
-
rx_allocSHT_NOBITShandling andPT_LOADsegment alignment (heliopause/src/export/cubin.rs:779-783,:801-832,:883).- If any section in
rx_allochass.kind == SHT_NOBITS,place(cubin.rs:779-783) does not advanceout.len(), sorx_end - rx_start(cubin.rs:806,:887) omits its size fromp_memszand allows subsequent sections to overlap itssh_offset. rx_start(cubin.rs:801) andrw_start(cubin.rs:813) are only padded to 8 bytes and everyPT_LOADhardcodesp_align = 8(cubin.rs:883), even when sections inside the segment require higher alignment (e.g.,.text.*sh_align = 128atcubin.rs:1164, or aligned.nv.globalSHT_NOBITS). As a result,(sh_offset - p_offset) % sh_alignis not guaranteed to be zero, and anSHT_NOBITS-onlyrw_allocsection withsh_align > 8gets itssh_offsetpushed into the section-header table range (cubin.rs:825-826).- Fix: Return
Ok(None)if anyrx_allocsection isSHT_NOBITS. Padrx_startandrw_startto the maxsh_alignof their respective sections (at least 8) and emit that alignment inp_align(or preserve inputp_align).
- If any section in
-
Charter-target validation, post-prune cross-reference self-check, and CI wiring (
heliopause/src/export/cubin.rs:365,.github/workflows/).- All live validation was run on SM87; SM103/SM120/SM121 were not exercised (
docs/design-review.md:62,:106-115), and no CI workflow compiles or testsheliopause(.github/workflows/native-serving.yml(not opened),python-cpu.yml). - Fix: (a) Run at least one SM120 or SM121 export +
flare runon a multi-kernel CUTLASS/FlashInfer workload before merge and attach the pruned/skipped module breakdown; (b) wirecargo test --locked --release --manifest-path heliopause/Cargo.toml --libinto CI; and (c) strengthen the post-prune validation atcubin.rs:365beyond header-onlyElf::parseto verify all survivingsh_link,sh_info,st_shndx,st_name, andPT_LOADbounds.
- All live validation was run on SM87; SM103/SM120/SM121 were not exercised (
Subtract / Simplify
- Deduplicate
is_debug_sectionand reuseSHT_*/SHF_*constants (heliopause/src/export/cubin.rs:189-193,:254-259,:113,:126,:145,:200,:208,:224).strip_debug(cubin.rs:189-193) retains an exact 5-line inline copy of the newly addedis_debug_sectionhelper (cubin.rs:254-259). Callis_debug_section(name)instrip_debugto delete the duplicate policy, and replace raw section-type/flag literals (2,3,8,& 2) in the same file with the constants just added atcubin.rs:14-23.
- Delete
align_upin favor ofusize::next_multiple_of(heliopause/src/export/cubin.rs:282-289).heliopause/Cargo.toml:6pinsrust-version = "1.88", and the crate already usesnext_multiple_of(heliopause/src/export/archive.rs:209,heliopause/src/export/io.rs:252(not opened),:647). Replacealign_up(value, align)withvalue.next_multiple_of(align.max(1))at its three call sites (cubin.rs:292,:780,:825).
- Deduplicate the triplicated
.text.*callee check and splittry_prune_unused_kernels(heliopause/src/export/cubin.rs:372-904,:513-516,:560-567,:592-599).- Extract a small
callee_text_section(syms, sec_names, sym_idx) -> Option<usize>helper used across the relocation,.nv.callgraph, andEIATTR_EXTERNSarms (dropping the redundant!keep_text.contains(&shx)checks at:564and:596sincekeep_text.insert(shx)deduplicates at:607), and split the 530-line body along its existing comment boundaries (layout gate, reachability, emit).
- Extract a small
Nits
- Update design docs to match the new symbol-pruning behavior:
docs/core-format-design.md:380-381currently states "The exporter preserves kernel and global symbol names in cubins" anddocs/runtime-core-design.md:76lists only "cubin debug stripping". Update both to reflect that unreferenced kernel symbols/sections may be pruned while referenced kernels and surviving globals are preserved. - Export progress observability (
heliopause/src/export/capture.rs:3384-3387): Optionally include pruned vs passthrough module counts inmodule_phase.finishso operators can see pruning effectiveness per export without external tooling. - Conservative over-retention from dead-kernel relocations (
heliopause/src/export/cubin.rs:493-519): Non-debug relocation tables targeting dead.text.*or.nv.constant*.<dead>sections are scanned unconditionally before reachability, conservatively retaining any.text.*targets referenced only by dead kernels. Safe as-is, but scoping relocation scanning to live/module-wide target sections would reclaim more kernels when dead kernels carry relocations.
Dropped on verification
- Upstream claim that
text_by_fn.len() <= keep_functions.len()(cubin.rs:434-436) and unmatchedtext_by_fn.get(fn_name)(cubin.rs:451-457) are "Major silent all-or-nothing passthrough bugs": Dropped. Whentext_by_fn.len() <= keep_functions.len()(e.g., all single-kernel Triton/Inductor/custom modules), there are zero unreferenced.text.*sections to prune, so skipping ELF rebuild is a valid fast-path—not a bug—and naturally accounts for most of the 88 unpruned modules. Bailing to passthrough on an unmatched captured name is the correct fail-safe to avoid dropping a live kernel. - Upstream claim that
capture.rs:3293-3298relaxes the standalone-module globals check ("a module whose globals were pruned away can no longer trip the error"): Dropped as false. Thatelsebranch runs only whenkernels.iter().find(|k| k.module == name)isNone, which meanskeep_functions(derived 1-to-1 fromkernelsatcapture.rs:3059-3141) is guaranteed empty, sostrip_and_prunereturnsstrip_debug(&image)without pruning (cubin.rs:360-362). - Upstream claim that
capture.rs:3282-3287unnecessarily rescansoutput.index.ranks[0].functionsinstead of reusing local state: Dropped.kernelsdoes not store.symbol(onlywire::Functiondoes), andoutput.index.ranks[0].functionsis never mutated between line 3187 and line 3282; keeping a cloned copy before the move would add code and allocation for zero benefit. - Upstream claim to delete or downgrade
Elf::parse(&pruned)?(cubin.rs:365) todebug_assert!: Dropped. Header/table parsing takes microseconds on an in-memory buffer and acts as a release-mode guard before writing artifacts; it should be strengthened (see Should Fix #3), not removed. - Upstream claim about "absence of any post-rewrite assertion that every kept
.textsurvived the cascade": Dropped as mathematically impossible.sh_info_is_section(cubin.rs:262) unconditionally returnsfalseforname.starts_with(b".text."), so the cascade loop (cubin.rs:625-642) can never drop any.text.*section. - Upstream claim that export-time peak memory "roughly triples" (
cubin.rs:359-368): Dropped as exaggerated/low-signal. Modules are processed sequentially one at a time (capture.rs:3280),prunedis typically ~12% of the input image size,cleanis required for the passthrough fallback, and buffers are dropped at the end of each loop iteration.
Full report Decision to Test: no (100%): 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: 98.6% -
triage:validation: 1.1% -
triage:design-review: 0.2% -
triage:partial: 0.0% -
none: 0.0% -
triage:investigate: 0.0% -
triage:integration: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Apply labels
No label changes