Opened by a workflow run, Dec 2, 2026 4:08 PM EST. decide malicious: all_clear (100%): No malicious content found
explore
Author: jcartu (GitHub CONTRIBUTOR, not a maintainer; mostly Rust/helios & docs work, first change to ignition/cli/environment.py; Discord: jcartu)
Motivation: Commit c9935887 made ignition fall back to /usr/local/cuda whenever [paths] cuda is unset, silently overwriting an inherited CUDA_HOME and pointing TRITON_PTXAS_PATH/CPATH at the wrong toolkit on hosts with several CUDA installs. The PR makes the config file win, then the caller's CUDA_HOME, then /usr/local/cuda, then native discovery.
Scale: +183 / −10 lines in 5 files
Proposal:
- Adds
_DEFAULT_LINUX_CUDAand reorders non-Windows toolkit resolution:[paths] cuda→ inheritedCUDA_HOME→/usr/local/cuda→ unset (clearing blankCUDA_HOME). - Strips whitespace from inherited
CUDA_HOMEand re-exports it normalized. - Sets
TRITON_PTXAS_PATHwhen[paths] cudais configured even over a non-blank ambient value, and fills it when the ambient value is blank. - Adds tests/cli/test_environment.py (149 lines, 10 POSIX-only tests with a leak-free
clean_environmentfixture). - Updates docs/cli-design.md:1480, docs/model-preparation.md:123-132 and AGENTS.md:466-473 to state the new precedence. Touches:
ignition/cli/environment.py— the sharedapply()used by five CLI paths (export,_prepare, debug-serve, join, bench).tests/cli/test_environment.py— new, first CPU coverage ofenvironment.applyin the tree.- Docs (
AGENTS.md,docs/cli-design.md,docs/model-preparation.md) — now partly conflict with the "no env vars / two levels of precedence" bullets. Related items: - #636
ignitionno longer respects theCUDA_HOMEenvironment variable (open): the bug this fixes; triagedtriage:design-review, zero comments. - #71 Preserve native CUDA toolkit selection with cuTile dependencies (merged): eugr removed automatic
CUDA_HOMEto fixcannot find -lcudart; #690 partially re-adds an environment-derived toolkit. - #231 Race a Triton tile kernel against cuBLAS (open): same toolchain/libdevice domain; its review asks for the
CUDA_HOME-before-import test #690 lacks. - #668 fix(ignition): reconcile divergent multi-host selections (open): touches the
apply()call sites, not the function. - #678 (open):
b12x_environmentpropagation in serve.py, adjacent only. Link: https://github.com/NVIDIA/hyperflare-inference/pull/690 Autobot comments: The PR is the third revision in six weeks of the same four lines, each by a different author: #71 (eugr) removed automaticCUDA_HOMEafter a pip cuTilenvccbroke native builds; c9935887 (Luke Alonso) added the/usr/local/cudafallback #636 blames; #690 re-balances the two. It also changes precedence for a second variable that the body only lists: a non-blank ambientTRITON_PTXAS_PATHnow loses to[paths] cuda, and a blank one is now filled — contrary to principle 10's "explicit user values win". Docs are only partly reconciled: AGENTS.md:452-455 forbids environment-variable behavior switches while the same PR edits AGENTS.md:466-473 to document one, and docs/cli-design.md:46-53 still saysCUDA_VISIBLE_DEVICESis the only environment input with exactly two precedence levels. Evidence is author-reported and POSIX-only: all 10 tests skip on Windows (claimed unchanged, untested), there is no GPU or multi-toolkit end-to-end run reproducing #636, and head 682152b has no CI checks. Coverage #71 claimed to add in tests/cli/test_serve.py no longer exists there, so this is also a restoration. #71's-lcudartfailure can only recur through a user's ownCUDA_HOMEpointing at a pip bundle — nowhere stated. #636 has zero comments and no maintainer design answer.
Value Proposition
Value Proposition — PR #690 "Preserve inherited CUDA_HOME in ignition.cli.environment"
Charter alignment. This is a 17-line fix in preparation tooling (ignition/cli/environment.py), not in the Helios runtime, so it adds no per-model branches or flags to shared runtime code. It addresses a concrete regression (#636, with a permalink to c9935887), which meets the charter's "reproducible bug" merge criterion. The one real tension is design-level: AGENTS.md:452-455 forbids reading an environment variable to choose behavior, while this same PR edits the neighbouring bullet (AGENTS.md:466-473) to document exactly that for CUDA_HOME. Principle 10's exception for "the documented CUDA device selection and dependency setup policies" (docs/design-review.md:89-92) is a plausible hook, but docs/cli-design.md:46-53 still states CUDA_VISIBLE_DEVICES is the only environment input and "Nothing else exists" — so post-merge the design doc contradicts the code. Fixable omission, not grounds to decline.
Novelty & status. Not obsolete: the only related merge since is c9935887, which is the regression. Not superseded: no open PR edits these lines; #231 (Triton/libdevice toolchain) is complementary, and #668/#678 touch apply() call sites, not the function. Genuinely additive: it is the first CPU-level coverage of environment.apply in the tree, since #71's tests/cli/test_serve.py cases have since vanished.
Value vs. cost. Blast radius is small — five call sites, all guarded by the empty paths.cuda default — against real benefit for users on multi-toolkit hosts. The residual cost is process risk: this four-line decision has been revised three times in six weeks (#71 → c9935887 → #690), each revision breaking the other camp, and #636 carries triage:design-review with zero maintainer comments. The PR also bundles an unrequested precedence reversal (ambient TRITON_PTXAS_PATH now loses to [paths] cuda, environment.py:78-81), against principle 10's "explicit user values win." Evidence is CPU-only, POSIX-only, author-reported, with no CI on head 682152b, no reproduction of the multi-toolkit scenario, and no downstream verification that the preserved value is honored.
Verdict: Worth it with changes. Required: (1) a recorded maintainer decision on #636's premise before merge; (2) drop or explicitly justify the TRITON_PTXAS_PATH precedence reversal; (3) reconcile docs/cli-design.md:46-53 and AGENTS.md:452-455; (4) a multi-toolkit reproduction or downstream toolkit assertion of the kind #231's review already requests.
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, priority:P2, bug
Threshold: 65%
Triage
- [✓]
triage:review: 73.0% -
triage:design-review: 26.8% -
triage:validation: 0.1% -
triage:investigate: 0.1% -
none: 0.0% -
triage:integration: 0.0% -
triage:verify-for-closure: 0.0% -
triage:partial: 0.0% -
triage:superseded: 0.0%
Priority
- [✓]
priority:P2: 97.2% -
none: 1.6% -
priority:P1: 1.2%
Type
- [✓]
bug: 77.7% -
enhancement: 37.8% -
community: 34.9% -
performance: 10.7% -
duplicate: 7.6% -
documentation: 4.2%
Area
-
area:preparation: 50.0% -
area:api: 37.8% -
area:packaging: 2.3% -
area:kernels: 1.6% -
area:memory: 1.6% -
area:engram: 1.4% -
area:orbit: 1.1% -
area:rocenante: 0.7% -
area:selene: 0.6% -
area:scheduling: 0.1% -
area:caching: 0.0%
Model
-
model:deepseek-v4: 0.6% -
model:inkling-small: 0.5% -
model:glm-5.3: 0.2% -
model:qwen3.8-flash-next: 0.2% -
model:deepseek-v4.1: 0.2% -
model:nemotron-3.5-bolt: 0.1% -
model:kimi-k3.1: 0.1% -
model:mimo-v2.6: 0.1% -
model:muse-glimmer: 0.0% -
model:gemma4: 0.0% -
model:qwen3.8-27b: 0.0%
Apply Labels (Intake)
Applied: +triage:review, +priority:P2, +bug
Subtraction and simplicity
Subtraction/Simplicity lens on PR #690. The production diff is lean (9 lines in apply + one constant; no new knob, flag, schema change, wrapper or dead code). Four real simplifications, ranked:
- (high) Delete
configured_cuda+ the 3-line condition atignition/cli/environment.py:58-59, 76-81. The alias exists only to flip precedence forTRITON_PTXAS_PATH, which #636 never asked for; reverting to the base one-liner removes a variable, a multi-line boolean and a.strip(), and costs two lines intests/cli/test_environment.py:68,74(the remaining 8 cases pass). - (medium)
tests/cli/test_environment.py:15-28, 45-58: the 12-entry_ENV_KEYStuple duplicates the namesapplywrites and thesetenv-then-poptrick needs a 3-line comment. Adict(os.environ)snapshot/restore fixture is ~18 lines shorter and cannot go stale. - (medium) The same 4-step toolkit order is now written three times —
docs/cli-design.md:1480,docs/model-preparation.md:123-132(grown 4→10 lines),AGENTS.md:466-473— while the now-false umbrella statements atdocs/cli-design.md:46-53("No environment variables… one exception", "Two levels of precedence… Nothing else exists") were left untouched. Keep the table row plus a pointer; spend the two bullets instead. - (low) Six identical
skipifdecorators (tests/cli/test_environment.py:61,78,92,109,123,138) should be one module-levelpytestmark, as in 33 other test modules; and the new comment atenvironment.py:55-57restates the branch below it while orphaning the pre-existing cuTile line 54.
Not removable: _DEFAULT_LINUX_CUDA (monkeypatch seam for the tests), the 1-line os.environ.pop("CUDA_HOME", None), and configuration.directory("cuda") (correct reuse of an existing helper). _load_config mirrors tests/cli/test_config.py:16-19 — consistent, not a violation.
Open: whether the ambient-TRITON_PTXAS_PATH override is intended (decides F1); where the toolkit policy should be documented; whether Windows will get a test.
Correctness and contracts
Correctness/contracts review of PR #690 (head 682152b): no Blocker; 4 Major findings, plus minors. Placement and ordering are right — environment.apply runs before torch import at all five call sites, the Windows branch is untouched, and there is no concurrency/memory/metric surface to break.
Majors: (1) the inherited CUDA_HOME is accepted with no validation (environment.py:61-63) while /usr/local/cuda is gated on is_dir() (:64), and libdevice/compiler identity derives from that root (tuning.py:52-65); a test asserts the invalid behavior (test_environment.py:110-120). (2) TRITON_PTXAS_PATH precedence silently reverses — [paths] cuda now beats an explicit ambient value, and blank values are filled (environment.py:78-81) against principle 10 "explicit user values win" (design-review.md:89-92); the blank arm has no test. (3) The design-doc contract is unreconciled: docs/cli-design.md:46-53 ("No environment variables … with one exception", "Nothing else exists") and AGENTS.md:461 ("the only variable Flare interprets") are unmodified and now false, though the PR relies on that clause for its principle-10 exception; issue #636 is triaged design-review with zero maintainer comments. (4) The resolved toolkit never appears in the plan/report (planning.py:383-420), contrary to AGENTS.md:456-460, and the #636 scenario (multi-toolkit host) is never reproduced — all 10 tests monkeypatch _DEFAULT_LINUX_CUDA.
Minors: stale #71 cuTile comment above code doing the opposite (environment.py:54-57); model-preparation.md:128-130 says "when unset" but blank values are also overwritten; whitespace normalization of an inherited CUDA_HOME untested; Windows untested (all cases skipif nt); latent non-idempotency (apply reads CUDA_HOME it wrote) unreachable since apply runs once per process.
Open: does a maintainer endorse CUDA_HOME outranking /usr/local/cuda? Is the ptxas override intended? Must cli-design 46-53 be amended for the exception to hold?
Final review
Recommendation: Changes Requested
The core fix in ignition/cli/environment.py is small, clean, well-placed before library imports, and directly addresses the regression reported in #636 without re-introducing #71's pip-bundle selection bug. Requesting changes before merge for two concrete items: (1) the PR leaves normative policy statements in AGENTS.md:461 and docs/cli-design.md:46-53 directly contradicting the new text it adds at AGENTS.md:468-471 and docs/cli-design.md:1480, and (2) it bundles an unrequested TRITON_PTXAS_PATH behavior change beyond #636 whose blank-value branch is untested and understated in docs/model-preparation.md:128-130 (on an issue still awaiting maintainer triage:design-review and with no CI run recorded on head 682152b).
Merge Risk
Level: Low
- Bounded startup blast radius:
ignition.cli.environment.applyruns synchronously once per process before PyTorch/Triton/b12x imports across five CLI entry points (ignition/cli/serve.py:210, 291, 436, 545andignition/cli/bench.py:205). It introduces no concurrency, runtime hot-path, schema, core-format, or Helios changes, and leaves Windows (os.name == "nt",ignition/cli/environment.py:70-75) untouched. - User-visible default-path behavior change: Because
paths.cudadefaults to""(ignition/cli/config.py:51, 172-175), every non-Windows user without an explicit[paths] cudanow inherits a non-emptyCUDA_HOMEinstead of falling back to/usr/local/cuda, and users with[paths] cudaconfigured now have ambientTRITON_PTXAS_PATHoverridden when<cuda>/bin/ptxasexists. - Process/policy sensitivity: This four-line policy has now changed three times in six weeks (
#71→c9935887→#690), issue #636 carriestriage:design-reviewwith no maintainer decision recorded yet, and head682152bhas no CI check results.
Walkthrough
ignition/cli/environment.py: Adds_DEFAULT_LINUX_CUDA = Path("/usr/local/cuda")(:22) and updates non-Windows toolkit resolution (:58-69) to[paths] cuda→ non-empty stripped inheritedCUDA_HOME→_DEFAULT_LINUX_CUDAwhen that directory exists →os.environ.pop("CUDA_HOME", None). Also updates POSIXTRITON_PTXAS_PATHassignment (:78-81) to set<cuda>/bin/ptxaswheneverconfigured_cuda is not Noneor ambientTRITON_PTXAS_PATHis unset/whitespace.tests/cli/test_environment.py: Adds the first direct unit suite forenvironment.apply()(6 POSIX test functions / 10 parametrized cases) with a leak-freeclean_environmentfixture (:45-58) covering configured override, inherited preservation, presetTRITON_PTXAS_PATH/existingCPATH, missing local toolkit files, fallback to_DEFAULT_LINUX_CUDA, and clearing blankCUDA_HOME.docs/cli-design.md,docs/model-preparation.md,AGENTS.md: Updates the CUDA toolkit row (docs/cli-design.md:1480), preparation setup paragraph (docs/model-preparation.md:123-132), and configuration bullet (AGENTS.md:466-473) to document the new non-Windows precedence.
Pre-merge Checks
- [PASS] Security / malicious screen: No suspicious code, credential access, command execution, or prompt-injection content found in the diff or PR description.
- [WARN] Charter & value fit: Fixes a real reproducible regression (#636) in preparation tooling with minimal footprint, and Principle 10 (
docs/design-review.md:89-92) exempts documented CUDA dependency setup policies, butAGENTS.md:461anddocs/cli-design.md:46-53still contradict the new policy and #636 (triage:design-review) lacks maintainer sign-off. - [PASS] Related / duplicate / conflict check: No duplicate, superseding, or conflicting PRs; does not re-introduce #71's automatic pip-bundle selection.
- [WARN] Tests & verification evidence: All 10 unit cases in
tests/cli/test_environment.pyare well-isolated and exercise the realenvironment.apply()andConfiguration.load(), but results are author-reported with no CI run on682152b, Windows is skipped across all tests, and the new blank/whitespaceTRITON_PTXAS_PATHand padded-non-emptyCUDA_HOMEbranches are untested.
Blockers
None.
Should Fix
- Reconcile the self-contradictory environment-variable policy statements (
AGENTS.md:461,docs/cli-design.md:46-53).AGENTS.md:461still states`CUDA_VISIBLE_DEVICES` is the only variable Flare interpretsin the exact same bullet where this PR addspreserves a non-empty inherited `CUDA_HOME`(AGENTS.md:468-471).docs/cli-design.md:46-53still states "Flare reads none, with one exception:CUDA_VISIBLE_DEVICES" and "Two levels of precedence. Flags override the configuration file, which overrides the recipe. Nothing else exists", directly contradicting the updated CUDA toolkit row atdocs/cli-design.md:1480andignition/cli/environment.py:61, 79.- Because Principle 10 (
docs/design-review.md:91-92) makes the env-var exemption conditional on "the documented CUDA device selection and dependency setup policies", updateAGENTS.md:461anddocs/cli-design.md:46-53(2–3 sentences) so the normative policy matches the decision table and implementation. Also obtain maintainer sign-off on #636 (triage:design-review) and ensurePython CPU testsCI runs green on the updated head.
- Align scope, test coverage, and docs for the
TRITON_PTXAS_PATHchange (ignition/cli/environment.py:58-59, 78-81,docs/model-preparation.md:128-130).- Issue #636 asks only to preserve
CUDA_HOMEahead of/usr/local/cuda. Beyond that,ignition/cli/environment.py:78-81changesmain's"TRITON_PTXAS_PATH" not in os.environso that (a) explicit[paths] cudanow overwrites a non-blank ambientTRITON_PTXAS_PATH(aligning POSIX with WindowsTRITON_PTXAS.EXE_PATHat:72), and (b) blank/whitespaceTRITON_PTXAS_PATHvalues are now populated. - If keeping this change: add a unit test covering blank/whitespace
TRITON_PTXAS_PATH(currently untested — every test intests/cli/test_environment.pysets a non-blank value or leaves it absent) and updatedocs/model-preparation.md:129-130from "populating it when unset" to "populating it when unset or blank". If scoping strictly to #636, seeSubtract / Simplify#1 below.
- Issue #636 asks only to preserve
Subtract / Simplify
- Optional strict-scope deletion (
ignition/cli/environment.py:58-59, 78-81): If maintainers prefer not to changeTRITON_PTXAS_PATHprecedence beyond #636, deleteconfigured_cudaand collapse lines 78–81 back toif ptxas.is_file() and not os.environ.get("TRITON_PTXAS_PATH", "").strip():(ormain's"TRITON_PTXAS_PATH" not in os.environ), removing the extra branch and keeping the PR strictly focused onCUDA_HOME. - Deduplicate the 4-step toolkit precedence prose (
docs/model-preparation.md:123-132): The same toolkit precedence order is now spelled out in three places (docs/cli-design.md:1480,docs/model-preparation.md:123-132,AGENTS.md:466-473) plus a fourth time inignition/cli/environment.py:55-57. Given how frequently this policy has changed, keep the canonical specification indocs/cli-design.mdand shortendocs/model-preparation.md:123-132to a brief summary pointing to[the CLI design](cli-design.md).
Nits
tests/cli/test_environment.py:61, 78, 92, 109, 123, 138: Replace the six identical@pytest.mark.skipif(os.name == "nt", ...)decorators with a single module-levelpytestmark = pytest.mark.skipif(...)matching repo convention (used across 30+ test modules, e.g.,tests/server/test_scheduler.py:23(not opened)), unless a Windows test (e.g., monkeypatchingos.name) is added to this file.tests/cli/test_environment.py: Add a case exercising whitespace-padded non-emptyCUDA_HOME(e.g.," /path/to/cuda ") to cover the.strip()normalization atignition/cli/environment.py:61, 69.ignition/cli/environment.py:54-57: Lines 55–57 restate the 9 lines immediately below them and leave the pre-existing cuTile sentence (:54) slightly orphaned; tighten to one concise comment referencing the policy indocs/cli-design.md.
Dropped on verification
- Unvalidated inherited
CUDA_HOME/ missingis_dir()check (Correctness M1): Dropped. Neither[paths] cuda(ignition/cli/config.py:172-175) nor PyTorch/FlashInfer silently ignores an explicitly supplied nonexistent path. Theis_dir()check on_DEFAULT_LINUX_CUDA(ignition/cli/environment.py:64) exists only because/usr/local/cudais an implicit fallback; silently falling through to/usr/local/cudawhen a user typosCUDA_HOMEwould compile against the wrong toolkit without error. - Claim that
[paths] cudaoverriding ambientTRITON_PTXAS_PATHviolates Principle 10's "explicit user values win over defaults" (Value Prop / Dossier #2 / Correctness M2): Dropped the Principle 10 framing. Underdocs/design-review.md:89-92,[paths] cudainconfig.toml(not opened) is the explicit configuration value rather than a default, and Windows already overwritesTRITON_PTXAS.EXE_PATHunconditionally (ignition/cli/environment.py:72). Retained only the verified scope, blank-value test gap, and doc wording mismatch. - Adding resolved CUDA toolkit to
Plan.to_dict()(Correctness M4): Dropped as scope creep.ignition/planning.py:383-420records no[paths]settings and runs beforeenvironment.apply()(ignition/cli/serve.py:200-210, 430-436);AGENTS.md:456-460applies to experimental recipe flags inPreparationConfig, not host filesystem paths. - Requiring a downstream torch/Triton libdevice test like PR #231 (Value Prop / Correctness M4): Dropped. PR #231 moved libdevice initialization to import time in
ignition/preparation/tuning.py; PR #690 only setsos.environinignition/cli/environment.pybeforeimport torch(ignition/cli/serve.py:291, 305), and CI (ubuntu-24.04in.github/workflows/python-cpu.yml(not opened)) has no CUDA toolkit installed. - Replacing
_ENV_KEYS+clean_environmentwith anos.environ.clear()snapshot fixture (Subtraction F2): Dropped. The proposed replacement both strips unrelated host variables (PATH,TMPDIR) and introduces a pytest teardown-ordering bug:clean_environmenttears down beforemonkeypatch.undo(), so tests callingmonkeypatch.setenv("CUDA_HOME", ...)recordnotsetagainst the cleared env and then delete the restored pre-existingCUDA_HOMEduringmonkeypatch.undo(). The PR's_ENV_KEYSlist (tests/cli/test_environment.py:15-28) covers all 12 keys written byenvironment.apply()and restores both present and absent variables cleanly. - Latent non-idempotency of
environment.apply()(Correctness m1): Dropped as a non-issue. Every call site invokesapply()once per process startup, and repeating it with the same inputs produces identical normalizedCUDA_HOME. - Possible recurrence of PR #71's
cuda-tilepip-bundle-lcudartfailure (Dossier / Correctness Open Question): Verified not triggered by PR #690; unlike pre-#71 code,apply()never auto-discovers a pipnvccbundle and only honors a caller-exportedCUDA_HOMEor/usr/local/cuda.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 99.3% -
triage:design-review: 0.6% -
none: 0.0% -
triage:partial: 0.0% -
triage:validation: 0.0% -
triage:verify-for-closure: 0.0% -
triage:integration: 0.0% -
triage:investigate: 0.0% -
triage:superseded: 0.0%
Apply labels
No label changes 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. decide malicious: all_clear (100%): No malicious content found
explore
Author: jcartu (GitHub CONTRIBUTOR, not a maintainer; Rust/helios and docs work, first change to ignition/cli/environment.py; Discord: jcartu) Motivation: On non-Windows hosts where /usr/local/cuda exists, ignition overwrites an exported CUDA_HOME, so a preparation that picked a second CUDA toolkit silently gets the default one instead (issue #636). The PR makes a non-empty inherited CUDA_HOME win over /usr/local/cuda, while an explicit [paths] cuda setting still wins over both. Scale: +220 / −22 lines in 5 files (source change is 10 added lines in one function) Proposal:
- Adds
_DEFAULT_LINUX_CUDA = Path("/usr/local/cuda")(environment.py:22) and a non-Windows resolution order:[paths] cuda→ stripped non-empty inheritedCUDA_HOME→/usr/local/cudaif it is a directory → clear blankCUDA_HOME(environment.py:54-64). - Leaves Windows (environment.py:67-72),
TRITON_PTXAS_PATH(:75, now identical tomain:67) andCPATH(:77-81) untouched — two earlier objections against head682152bare retracted. - Rewrites the env-var and precedence policy to match:
docs/cli-design.md:46-62,AGENTS.md:461-474,docs/model-preparation.md:123-126, plus the table rowdocs/cli-design.md:1489. - Adds the first direct unit suite for
environment.apply(): 8 functions / 12 cases, POSIX-only, leak-freeclean_environmentfixture (tests/cli/test_environment.py:15-18, 20-33, 50-63). - New behaviour now frozen by test: a nonexistent inherited
CUDA_HOMEis kept and gets no/usr/local/cudafallback (:138-148) — a stale export now yields no toolkit env at all. Touches: ignition/cli/environment.py— the single decision all five CLI entry points call into (serve.py:210 (not opened), 291, 436, 545; bench.py:205 (not opened)).docs/cli-design.mdandAGENTS.md— normative policy statements, now reconciled with the code.tests/cli/test_environment.py— new, POSIX-only; Windows untested. Related items:- #636
ignitionno longer respects theCUDA_HOMEenvironment variable (open): the issue this fixes; still zero comments, stilltriage:design-review. - #71 Preserve native CUDA toolkit selection with cuTile dependencies (merged): earlier change that removed automatic
CUDA_HOME; this PR re-adds environment inheritance without its pip-bundle trigger. - #231 (open): same Triton/libdevice toolchain area; its review asks for the end-to-end test this PR still lacks.
- #668 (open): touches
apply()call sites in serve.py (not opened), not the function. Link: https://github.com/NVIDIA/hyperflare-inference/pull/690 Autobot comments: The stale/nonexistent inheritedCUDA_HOMEpath (tests/cli/test_environment.py:138-148) is the one regression versusmainand is undocumented in all three docs.AGENTS.md:452-455still forbids env-var behaviour switches with no pointer to the:461carve-out the same PR adds. Evidence remains CPU-only and author-reported (148 passed claimed, no observable CI result for39796ea4); nothing shows the preservedCUDA_HOMEactually steering flashinfer's JIT ornvcc. This four-line policy has now been revised three times in six weeks by three authors (#71 → c9935887 → #690) with no maintainer-recorded design decision on #636.
Classify intake
Selected: triage:review, priority:P2, bug
Threshold: 65%
Triage
- [✓]
triage:review: 80.8% -
triage:design-review: 15.9% -
triage:validation: 1.7% -
triage:investigate: 1.2% -
none: 0.3% -
triage:partial: 0.0% -
triage:verify-for-closure: 0.0% -
triage:integration: 0.0% -
triage:superseded: 0.0%
Priority
- [✓]
priority:P2: 99.5% -
none: 0.3% -
priority:P1: 0.2%
Type
- [✓]
bug: 90.5% -
community: 24.5% -
duplicate: 16.5% -
enhancement: 11.9% -
documentation: 2.6% -
performance: 1.6%
Area
-
area:api: 40.7% -
area:preparation: 29.4% -
area:rocenante: 2.3% -
area:kernels: 1.4% -
area:memory: 0.4% -
area:orbit: 0.3% -
area:caching: 0.3% -
area:selene: 0.2% -
area:engram: 0.1% -
area:packaging: 0.0% -
area:scheduling: 0.0%
Model
-
model:deepseek-v4.1: 2.0% -
model:kimi-k3.1: 0.2% -
model:qwen3.8-flash-next: 0.2% -
model:deepseek-v4: 0.2% -
model:glm-5.3: 0.2% -
model:nemotron-3.5-bolt: 0.1% -
model:inkling-small: 0.1% -
model:mimo-v2.6: 0.1% -
model:gemma4: 0.0% -
model:muse-glimmer: 0.0% -
model:qwen3.8-27b: 0.0%
Apply Labels (Intake)
No label changes
Subtraction and simplicity
PR #690 (head 39796ea4) is lean in code — 9 changed lines in one function, no new flags, config knobs, wrappers or dead code; the subtraction available is almost entirely prose.
- AGENTS.md:461-474 re-states the CUDA_HOME/TRITON_PTXAS_PATH/CPATH policy that the same sentence's trailing "as specified in [the CLI design]" already owns, and two of the three added clauses describe unchanged main behaviour. Replace with one clause pointing at docs/cli-design.md; also cross-link the :452-455 "never read an environment variable" prohibition to this carve-out.
- docs/cli-design.md states the same precedence three times: :50-55, :60-62 (pure restatement — delete) and the :1489 table row. The :53-55 TRITON_PTXAS_PATH/CPATH sentence duplicates the :1489 parenthetical and describes untouched code (environment.py:73-81 == main:65-73); keep the table row, trim the principle prose.
- ignition/cli/environment.py:54-64 — the trailing
else: os.environ.pop("CUDA_HOME", None)is a no-op when CUDA_HOME is absent and unreachable for a non-empty value; hoisting it collapses the 3-way if/elif/else from 8 lines to 3 with identical behaviour. - environment.py:22
_DEFAULT_LINUX_CUDAis used exactly once and exists only as a monkeypatch seam for the new tests; repo precedent (ignition/preparation/kv_codec.py:32) inlines the path. Defensible, but should be a deliberate choice. Minor: tests/cli/test_environment.py:151 and :165 both parametrize "" and " ", which .strip() to the same value at environment.py:58 — one blank case suffices.
Docs/model-preparation.md:123-126 (not opened) is the model: reduced correctly to a pointer. No existing repo helper is duplicated (Configuration.directory reused correctly; no conftest.py (not opened) exists).
Correctness and contracts
Correctness/contracts review of PR #690 (risk-lens 1/2/3/4). Two real findings plus two minor ones — but read the citation-basis caveat first.
Citation basis: the pr/690 snapshot this environment resolves does NOT match the stated head 39796ea (it still contains the pre-fix configured_cuda ptxas condition that the dossier says was removed, and docs/cli-design.md still has the old "No environment variables … only CUDA_VISIBLE_DEVICES" text). Findings below are marked [snapshot-verified] or [head-cited from prior pass].
Findings:
- Major [snapshot-verified] A stale/nonexistent inherited
CUDA_HOMEis accepted on truthiness alone —ignition/cli/environment.py:60-67, nois_dir()check unlike the/usr/local/cudabranch at:64. On a host that worked via/usr/local/cuda, a leftover exportedCUDA_HOMEnow yields noTRITON_PTXAS_PATHand noCPATH;tests/cli/test_environment.py:109-120freezes that no-op as contract and no doc discloses it (AGENTS.md:469-471). - Major [snapshot-verified; dossier says fixed at head]
TRITON_PTXAS_PATHprecedence reversal —environment.py:78-81overwrites a non-blank ambientTRITON_PTXAS_PATHwhenever[paths] cudais set, versusmain:67where ambient wins;test_environment.py:62-75asserts the reversal. Contradicts the PR's "TRITON_PTXAS_PATH … unchanged". - Minor [snapshot-verified] Docs unreconciled in this snapshot:
docs/cli-design.md:46-51still saysCUDA_VISIBLE_DEVICESis the only variable whileAGENTS.md:461-472already describesCUDA_HOMEpreservation. - Minor [snapshot-verified]
apply()cannot distinguish inherited from derivedCUDA_HOME(:61reads the slot:69writes), so a second call in one process can never un-set a previously written value.
Clean: Windows untouched and correctly gated (:70-75, :60); blank-value pop correct (:66-67, tested :140-149); no concurrency, lock, cache, allocation, metric or contract impact — the metric/rate/admission span check finds nothing sampled here.
Open: does the true head 39796ea contain finding 2? Should a nonexistent inherited CUDA_HOME fall back to /usr/local/cuda? #636 still has no maintainer decision; no end-to-end proof the preserved value steers flashinfer/nvcc.
Re-review
Recommendation: Ready To Merge
Head 39796ea cleanly resolves both prior Round 1 review items: ignition/cli/environment.py:75 restores main's exact "TRITON_PTXAS_PATH" not in os.environ check (keeping the diff strictly scoped to non-Windows CUDA_HOME fallback precedence), and AGENTS.md:461-474, docs/cli-design.md:46-62, 1489, and docs/model-preparation.md:123-126 are now mutually consistent with Principle 10 (docs/design-review.md:89-92). The code change is 10 added lines in a single startup function with well-isolated unit coverage (8 tests / 12 parametrized cases in tests/cli/test_environment.py) and zero runtime, concurrency, or Windows regressions. Maintainers should only confirm they endorse issue #636's policy premise (triage:design-review still has no recorded maintainer comment) and that PR CI passes on 39796ea.
Merge Risk
Level: Low
- Bounded startup blast radius:
ignition.cli.environment.applyexecutes synchronously once per process beforeflare_heliopause/torchimports across five CLI entry points (ignition/cli/serve.py:210, 291, 436, 545andignition/cli/bench.py:205). No Helios runtime, concurrency, hot-path, schema, core-format, or Windows (ignition/cli/environment.py:67-72) paths are affected. - Default-path behavior shift for inherited
CUDA_HOME: Becausepaths.cudadefaults to""(ignition/cli/config.py:51, 172-175), non-Windows runs without[paths] cudanow preserve any non-empty inheritedCUDA_HOMEverbatim rather than overwriting it with/usr/local/cuda. That fixes multi-toolkit selection (#636), with the expected trade-off that a host carrying a stale/nonexistentCUDA_HOMEin its shell profile will keep that value instead of silently falling back to/usr/local/cuda(leavingTRITON_PTXAS_PATHandCPATHunset, matching[paths] cudabehavior). - Governance / verification context: Issue #636 still carries
triage:design-reviewwith zero maintainer comments, and while the new unit suite runs in.github/workflows/python-cpu.yml:30-33(not opened), CI check results for39796eaand GPU/Windows runs were not observable here.
Walkthrough
ignition/cli/environment.py: Adds_DEFAULT_LINUX_CUDA = Path("/usr/local/cuda")(:22) and updates non-Windows toolkit resolution (:54-64) to[paths] cuda→ non-empty whitespace-stripped inheritedCUDA_HOME→_DEFAULT_LINUX_CUDAwhen that directory exists →os.environ.pop("CUDA_HOME", None). Leaves Windows (:67-72), POSIXTRITON_PTXAS_PATH(:74-76, identical tomain:66-68), andCPATHprepending (:77-81, identical tomain:69-73) unchanged.tests/cli/test_environment.py: Adds 8 POSIX test functions (12 parametrized cases, module-levelpytestmarkat:15-18) with a leak-freeclean_environmentfixture (:50-63, covering all 12 variables in_ENV_KEYS) exercising[paths] cudaoverride with unset and pre-setTRITON_PTXAS_PATH, inheritedCUDA_HOMEpreservation (including whitespace normalization, pre-setTRITON_PTXAS_PATH/existingCPATH, and paths without local toolkit files), fallback to_DEFAULT_LINUX_CUDAon unset/blankCUDA_HOME, and clearing blankCUDA_HOMEwhen no toolkit source exists.docs/cli-design.md,AGENTS.md,docs/model-preparation.md: Aligns the normative environment-variable policy (docs/cli-design.md:46-62,AGENTS.md:461-474) and configuration ownership table (docs/cli-design.md:1489) with Principle 10 (docs/design-review.md:89-92) and replaces duplicated prose indocs/model-preparation.md:123-126with a brief pointer todocs/cli-design.md.
Pre-merge Checks
- [PASS] Security / malicious screen: No suspicious code, credential access, command execution, or prompt-injection content in the diff or PR conversation.
- [WARN] Charter & value fit: Minimal, well-placed fix for a reproducible regression (#636) within Principle 10's documented CUDA dependency setup exception (
docs/design-review.md:89-92), but #636 (triage:design-review) still lacks a recorded maintainer sign-off. - [PASS] Related / duplicate / conflict check: No duplicate, superseding, or conflicting open PRs touch
ignition/cli/environment.pyortests/cli/test_environment.py, and #71's automatic pip-bundle selection is not reintroduced. - [WARN] Tests & verification evidence: All 12 unit cases in
tests/cli/test_environment.pyare well-isolated and exercise the realenvironment.apply()andConfiguration.load()(stubbing onlyruntime_patches.apply), but the148/148run is author-reported without observable CI check output on39796ea, and Windows and end-to-end GPU preparation were not run (disclosed in the PR body).
Blockers
None.
Should Fix
None.
Subtract / Simplify
- Optional prose deduplication (
docs/cli-design.md:50-62,AGENTS.md:470-473): The full non-Windows CUDA toolkit precedence andTRITON_PTXAS_PATH/CPATHdetails are now written out three times indocs/cli-design.md(:50-55,:60-62, and the configuration ownership table at:1489) and once more inAGENTS.md:470-473. Consider keepingdocs/cli-design.md:1489as the single canonical specification, deleting the redundant second mention atdocs/cli-design.md:60-62, and trimmingdocs/cli-design.md:50-55andAGENTS.md:470-473to brief pointers (matching the clean pattern already used indocs/model-preparation.md:123-126).
Nits
docs/cli-design.md:50-52/AGENTS.md:470-471: If maintainers want the stale-CUDA_HOMEbehavior explicit in docs, you can optionally note that a non-empty inheritedCUDA_HOMEis preserved verbatim without an existence check (matching[paths] cuda).
Dropped on verification
TRITON_PTXAS_PATHprecedence reversal (Correctness F2): Stale finding from the earlier commit682152b. Verified at39796ea:configured_cudawas removed andignition/cli/environment.py:75is byte-identical tomain:67(if ptxas.is_file() and "TRITON_PTXAS_PATH" not in os.environ:), withtests/cli/test_environment.py:81-93verifying ambientTRITON_PTXAS_PATHis kept.docs/cli-design.md:46-51contradictsAGENTS.md(Correctness F3): Stale finding from682152b. Verified at39796ea:docs/cli-design.md:46-62was updated and now agrees withAGENTS.md:461-474anddocs/cli-design.md:1489.- Stale/nonexistent inherited
CUDA_HOMEflagged as a Major bug requiringPath(inherited_cuda).is_dir()fallback (Correctness F1 / Dossier #3): Dropped as a defect. Preserving a non-empty user-suppliedCUDA_HOMEverbatim matches[paths] cudabehavior onmain(ignition/cli/environment.py:54-58), aligns with PyTorch/FlashInfer/CMake conventions and Principle 10 ("explicit user values win over defaults"), and avoids silently redirecting a typo'dCUDA_HOMEto/usr/local/cuda. The trade-off for stale shell profiles is noted under Merge Risk and Nits. apply()re-reading its ownCUDA_HOMEwrite on a second in-process call (Correctness F4): Dropped as speculative/low-signal. All five production call sites (ignition/cli/serve.py:210, 291, 436, 545,ignition/cli/bench.py:205) are single-shot pre-import entrypoints (which already perform one-shotos.environ,_DLL_DIRECTORIES, andruntime_patches.apply()mutations), and cachingCUDA_HOMEat module import time would breakmonkeypatch.setenvand late pre-applysetup.- Hoisting
if cuda is None: os.environ.pop("CUDA_HOME", None)outsideos.name != "nt"and collapsingignition/cli/environment.py:57-64into a nested ternary (Subtraction F3): Dropped. Movingpop("CUDA_HOME", None)outsideif cuda is None and os.name != "nt":would introduce a Windows regression by clearingCUDA_HOMEon Windows whenever[paths] cudais unset, and a nested ternary is less readable than the existing 6-lineif/elif/else. - Removing
_DEFAULT_LINUX_CUDA(ignition/cli/environment.py:22), dropping the""parametrized cases (tests/cli/test_environment.py:151, 165), rewritingclean_environment(:50-63), or removing[paths] cudaregression tests (:66-93) (Subtraction F4 / Dossier Q4): Dropped as low-signal style preferences._DEFAULT_LINUX_CUDAavoids brittle globalPath.is_dirpatching,clean_environmentcleanly restores all 12 managed keys in_ENV_KEYS, and the[paths] cudatests directly guard top precedence and presetTRITON_PTXAS_PATH. - Adding a cross-reference on untouched
AGENTS.md:452-455(Dossier §2 / Subtraction F1): Dropped. Lines:452-455prohibit env vars that choose behavior, the:461policy bullet sits six lines below in the same list, and Round 2 review avoids adding fresh nits on untouched lines.
Full report Decision to Test: yes (50%): Testing will add considerable value with the code. It is ready to merge and the tests will validate and improve confidence on hardware we have available for testing.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 95.5% -
triage:design-review: 3.3% -
none: 0.7% -
triage:validation: 0.4% -
triage:investigate: 0.0% -
triage:verify-for-closure: 0.0% -
triage:integration: 0.0% -
triage:partial: 0.0% -
triage:superseded: 0.0%
Apply labels
No label changes
Pre Test Report
Hardware test plan — PR #690 "Preserve inherited CUDA_HOME in ignition.cli.environment"
Headline: this PR has no speedup to measure, and benchmarking it would waste GPU time
I read the actual head (39796ea4) rather than the case file, and the production diff is smaller than any of the review rounds described. ignition/cli/environment.py changes exactly one decision, executed once per process before any library import:
# main:55-58
if cuda is None and os.name != "nt" and Path("/usr/local/cuda").is_dir():
cuda = Path("/usr/local/cuda")
# head:56-66
cuda = configuration.directory("cuda")
if cuda is None and os.name != "nt":
inherited_cuda = os.environ.get("CUDA_HOME", "").strip()
if inherited_cuda: cuda = Path(inherited_cuda)
elif _DEFAULT_LINUX_CUDA.is_dir(): cuda = _DEFAULT_LINUX_CUDA
else: os.environ.pop("CUDA_HOME", None)
Verified byte-identical to main, i.e. out of test scope: POSIX TRITON_PTXAS_PATH (head:74-76 == main:66-68), CPATH prepending (head:77-81 == main:69-73), and the whole Windows branch (head:67-72 == main:59-64). The Round-1 TRITON_PTXAS_PATH precedence reversal and the doc contradictions were real at 682152b and are gone at this head.
Two consequences for the test engineer:
- No performance claim exists. The PR body, the dossier and all three review rounds make none. The change writes
os.environstrings at startup; it cannot alter steady-state throughput.ignition benchmeasures captured-graph latency and explicitly excludes preparation (ignition/cli/bench.py:30-58), which is the only path this PR touches — so a bench run measures a quantity the diff cannot move, at the cost of a 96 GiB-GPU job. - The property that can fail is toolkit identity, not speed: which
CUDA_HOME/TRITON_PTXAS_PATH/CPATH/libdevice the process ends up with on a multi-toolkit host. Everything below tests that, and the whole thing fits in ~25 CPU-minutes and 0 GPU-minutes.
Host choice
- cn5 (x86_64, 4× RTX PRO 6000 Blackwell, sm_120) is the right host — sm_120 is a supported capability (
ignition/planning.py:37), and 4 homogeneous GPUs mean any GPU tier is a single-GPU--gpus 0job, no TP. - cn7 (arm64 GB10, sm_121, 1 GPU) adds nothing for a POSIX precedence change; keep it as fallback only.
- The PR needs no model at all. Should a GPU tier be run: cn5's
nvidia/GLM-5.3-Flash-NVFP4/local-inference-lab/GLM-5.3-Flash-NVFP4is usable (glm53recipe,docs/core-design.md:357(not opened)).facebook/dinov2-baseandtimm/vit_base_patch14_dinov2.lvd142mare unusable — there is no dinov2/timm recipe anywhere in the tree. All inventory sizes read 0 GiB, so treat cached state as unknown; a real prepare implies a large download. - Keep caches off the 16 GiB scratch disk on both hosts; preparation caches exceed it.
Tier 0 — regression suite for the changed function (2 min, CPU, cn5)
uv sync --locked --extra prepare --extra test # docs/model-preparation.md:67
CUDA_VISIBLE_DEVICES="" .venv/bin/python -m pytest tests/cli/test_environment.py -q
Expect 12 passed, 0 skipped. A skip means os.name == "nt" — wrong host. Do not count the author's 148/148 as evidence; it is author-reported and I found no CI result.
Tier 1 — close the two real CI blind spots (5 min, CPU, cn5)
CI runs ubuntu-24.04 with no CUDA toolkit installed (.github/workflows/python-cpu.yml:14 (not opened),21-33), so in CI _DEFAULT_LINUX_CUDA.is_dir() is always False and the /usr/local/cuda fallback and the pop branch never execute for real — the unit suite stubs them (tests/cli/test_environment.py:70,99,112,125,141,154,167). cn5 has a real toolkit, so it can cover both.
(a) Downstream proof that the toolkit is honored. tests/preparation/test_toolchain.py already exists and is GPU-free: it runs in a subprocess with CUDA_VISIBLE_DEVICES="", monkeypatches torch.cuda._lazy_init to raise so CUDA initialization cannot happen (:26-29), and asserts triton extern_libs["libdevice"] == Path(torch CUDA_HOME)/nvvm/libdevice/libdevice.10.bc (:34,67).
CUDA_VISIBLE_DEVICES="" .venv/bin/python -m pytest tests/preparation/test_toolchain.py -q # want "2 passed"
2 skipped means no libdevice was found — report it as an unrun check, not a pass (AGENTS.md:302-307).
(b) Exercise the new is_dir() branch without monkeypatching:
env -u CUDA_HOME -u TRITON_PTXAS_PATH CUDA_VISIBLE_DEVICES="" .venv/bin/python -c "
from ignition.cli.config import Configuration; from ignition.cli import environment
import os; environment.apply(Configuration.load(None), ())
print({k: os.environ.get(k) for k in ('CUDA_HOME','TRITON_PTXAS_PATH','CPATH')})"
Configuration.load(None) with no file yields empty defaults, so paths.cuda == "" (ignition/cli/config.py:51,79-82). Expect CUDA_HOME=/usr/local/cuda iff that directory exists.
(c) Prove the tests are sensitive (docs/verification.md:121-135): in a scratch copy, replace environment.py:57-63 with main's one-liner; tests/cli/test_environment.py must fail. Restore.
Tier 2 — reproduce #636 at the decision point (10 min, CPU only, cn5)
Build two synthetic toolkits, each with real bin/ptxas, include/, nvvm/libdevice/libdevice.10.bc, and bin/nvcc symlinked to the real nvcc. The nvcc symlink is not optional: kv_codec._find_nvcc falls back to shutil.which("nvcc") and then /usr/local/cuda/bin/nvcc (ignition/preparation/kv_codec.py:26-32), so a toolkit without nvcc silently resolves to the real one and masks the decision under test.
Re-run the Tier 1(b) probe with variants:
| Variant | Env | Expected (head) | main |
|---|---|---|---|
| A | -u CUDA_HOME |
/usr/local/cuda |
same |
| B (the fix) | CUDA_HOME=/tmp/tk-b |
CUDA_HOME/TRITON_PTXAS_PATH/CPATH all under /tmp/tk-b |
/usr/local/cuda ← #636 |
| C (regression) | CUDA_HOME=/tmp/tk-b-missing |
CUDA_HOME kept verbatim; TRITON_PTXAS_PATH and CPATH absent |
/usr/local/cuda, works |
| D | [paths] cuda=/tmp/tk-a + CUDA_HOME=/tmp/tk-b |
tk-a wins |
same |
| E | preset TRITON_PTXAS_PATH=/opt/x/ptxas + CUDA_HOME=/tmp/tk-b |
ambient value kept (:75) |
same |
Variant C is the only behavior regression versus main, and it is frozen as contract by tests/cli/test_environment.py:138-148: a host with a stale CUDA_HOME in its shell profile, which works today via /usr/local/cuda, will after this PR export CUDA_HOME and nothing else. Get a maintainer's explicit yes/no on that, or the test must change. Also confirm whitespace normalization: CUDA_HOME=" /tmp/tk-b " → CUDA_HOME=/tmp/tk-b (:58,:66).
Then the downstream leg — the thing no review round actually executed:
CUDA_HOME=/tmp/tk-b CUDA_VISIBLE_DEVICES="" .venv/bin/python -m pytest tests/preparation/test_toolchain.py -q
CUDA_HOME=/tmp/tk-b CUDA_VISIBLE_DEVICES="" .venv/bin/python -c "
from pathlib import Path
from ignition.preparation.kv_codec import compile_gpu_codec_cubin, _find_nvcc
print('nvcc:', _find_nvcc()); print('cubin:', compile_gpu_codec_cubin((12,0), cache_dir=Path('/tmp/kvcodec')))"
The second command proves CUDA_HOME steers a real compiler and produces an ELF cubin with no GPU (kv_codec.py:110-130). _find_nvcc() must print the /tmp/tk-b path.
Tier 3 — optional single-GPU prepare, only if "run it on hardware" must be satisfied (~1–2 GPU-hours, cn5, 1 of 4 GPUs)
Two arms with separate [paths] kernel_cache. This is essential: the compiled-forward cache key covers torch_key(), runtime_patches.identity(), device capability and name but not the toolkit (ignition/preparation/compilation.py:313-315), and kernel/tuning caches key on revision, recipe, GPU and settings (docs/cli-design.md:1762-1766). A shared cache makes the two arms identical and the run vacuous.
# Arm A — main behavior
env -u CUDA_HOME .venv/bin/ignition export nvidia/GLM-5.3-Flash-NVFP4 --gpus 0 --verbose # kernel_cache=/data/pr690-a
# Arm B — PR fix
CUDA_HOME=/tmp/tk-b .venv/bin/ignition export nvidia/GLM-5.3-Flash-NVFP4 --gpus 0 --verbose # kernel_cache=/data/pr690-b
Log env | grep -E 'CUDA_HOME|TRITON_PTXAS_PATH|CPATH' before each. Compare the {"plan": ...} JSON on stderr: it should be identical — Plan.to_dict() records no [paths] settings (ignition/planning.py:383-420). Pass = both exports complete and arm B compiled against tk-b, with no -lcudart/pip-bundle error (the #71 recurrence check).
Do not run
ignition bench— no latency claim to measure; it excludes preparation (bench.py:30-58).- Any 4-GPU or TP job — the change is per-process and pre-import.
- A Windows comparison — no Windows host here, and the Windows branch is identical to
main(environment.py:67-72vsmain:59-64). Windows remains untested, as the author disclosed; report it as an unrun check. - cn7, unless cn5 is unavailable.
What the engineer should report back
- Tier 0: 12 passed / 0 skipped, or the failures.
- Tier 1a:
2 passedvs2 skipped(libdevice real vs missing). - Tier 2: the variant table filled in,
_find_nvcc()path, and whether the.cubinis a valid ELF file. - An explicit maintainer answer on Variant C (stale
CUDA_HOMEyields no toolkit) — the one user-visible regression this PR introduces, test-frozen and undocumented. - Confirmation that CI's
Python CPU testsis green on the tested head; the last three review rounds each noted no observable CI result.
Bottom line: this is a low-risk, GPU-irrelevant change. Tiers 0–2 (≈17 CPU-minutes on cn5) fully validate the property that can fail, and one synthetic-toolkit prepare at most is worth the silicon. Approving a bench run would spend GPU time on a quantity the diff provably cannot change.
Discord Test Request
Discord post (ready to paste)
Recommendation: Test
High confidence — verified against the actual head (39796ea), not just the report: the production change is 10 added lines in ignition/cli/environment.py:56-66, replacing main:55-58. No performance claim exists anywhere in the PR, and none is possible. Test it on CPU, not on a GPU.
Hardware Required
- cn5 (x86_64, 4× RTX PRO 6000, sm_120) with a real CUDA toolkit installed — Tiers 0–2 all run with
CUDA_VISIBLE_DEVICES="", so zero GPU time. - Two synthetic toolkits under
/tmp(bin/ptxas,include/,nvvm/libdevice/libdevice.10.bc, andbin/nvccsymlinked to the real nvcc — the symlink is required or the test silently falls back to the real nvcc). - Nothing else: no model, no download, no second host. cn7 (arm64) only if cn5 is unavailable.
Justification
- There is no speedup to measure. The diff writes
os.environstrings once per process before any library import;ignition benchexplicitly excludes preparation (ignition/cli/bench.py:30-58), which is the only path touched — a bench run burns a 96 GiB-GPU job on a quantity the change provably cannot move. - The real failure mode is toolkit identity, and CI cannot see it. CI runs
ubuntu-24.04with no CUDA toolkit, so the/usr/local/cudafallback and thepopbranch never execute for real — the 12 unit cases stub them (tests/cli/test_environment.py:70,99,112,125,141,154,167). Only a host with a real toolkit covers them.
Estimated Time to Complete
≈25 CPU-minutes on cn5 (Tier 0 ≈2 min regression suite, Tier 1 ≈5 min closing the CI blind spots, Tier 2 ≈10 min synthetic-toolkit precedence matrix). Add ~1–2 GPU-hours only if a real single-GPU prepare must be run to satisfy "tested on hardware."
Notes for whoever posts this (not part of the post)
- One maintainer decision is needed before merge, not before testing: Variant C — a host with a stale/non-existent
CUDA_HOMEin its shell profile currently works via/usr/local/cuda, but after this PR keepsCUDA_HOMEverbatim and exports noTRITON_PTXAS_PATH/CPATH. I confirmed this is frozen as contract bytests/cli/test_environment.py:138-148. It is the only behavior regression versusmain. - Do not run
ignition bench, any 4-GPU/TP job, a Windows comparison (no Windows host; the Windows branch:67-72is byte-identical tomain:59-64), or cn7 unless cn5 is down.facebook/dinov2-baseandtimm/vit_base_patch14_dinov2.lvd142mhave no recipe anywhere in the tree — unusable; if a prepare is run, cn5'snvidia/GLM-5.3-Flash-NVFP4is the one usable pair, with separate[paths] kernel_cacheper arm (the cache key omits the toolkit, so a shared cache makes the two arms vacuous). - Ask the engineer to report back: Tier 0 (12 passed / 0 skipped), Tier 1a (
2 passedvs2 skipped— a skip means no libdevice and must be reported as an unrun check,AGENTS.md:302-307(not opened)), the filled-in variant table plus_find_nvcc()path and valid-ELF cubin, confirmation thatPython CPU testsis green on the tested head (no observable CI result in any of the three review rounds), and the Variant C yes/no.