Repository navigation
test(smoketest): stop reporting a skipped or never-launched example as a full PASS - #665
Merged
nihalpasham merged 1 commit intoAug 6, 2026
Conversation
…s a full PASS
verdict_standard decides a bare `PASS` from `grep -qE 'SUCCESS|PASS|Complete'`
over the whole log. Skip declarations routinely contain those words, so a skip
the function fails to recognise is not merely missing its "(skipped)"
annotation: it is promoted to a full execution PASS, indistinguishable in the
summary from an example that launched kernels and verified results.
Three cases all reported a clean `PASS`:
* wgmma_mma_bf16's `main` only prints. Its module doc says "compilation and
PTX generation only. Do not launch this kernel." It belongs in `standard`
because the build and the host binary must both succeed, but that
category's contract is that execution succeeds, so every GPU run counted
it as an execution pass. Name it in NO_LAUNCH_EXAMPLES and report
`PASS (compiled, no launch)`.
* generated_ldmatrix prints `PASS (skipped): ...` below sm_75. The skip
check matched only a leading lowercase `skipping:`, so that line fell
through to the success grep, which then matched its own `PASS`.
* A capitalised `Skipping:` did the same thing. NVIDIA#658 reworded the two
examples that hit it, so nothing triggers this today; matching
case-insensitively keeps the next one from reaching the success grep.
Compile-only runs collapse every category into verdict_compile, so the
GPU-less examples-compile lane is unaffected. This changes real-GPU runs.
Fixes NVIDIA#656
Signed-off-by: Vyncint Ng <[email protected]>
Collaborator
|
The script-side half #656 needed, verified on RTX 5090:
|
nihalpasham
approved these changes
Aug 6, 2026
nihalpasham
added a commit
that referenced
this pull request
Aug 6, 2026
…test verdict requires Merging #670 (new example) and #665 (stricter smoketest verdicts) in the same batch left this example failing the standard-category check: both kernels verify to exact match but nothing prints SUCCESS/PASS/Complete, and the stricter harness rightly no longer rescues such a log.
vyncint
added a commit
to vyncint/cuda-oxide
that referenced
this pull request
Aug 6, 2026
scripts/smoketest.sh assumes two things about the examples that nothing verified, and neither is reachable without a GPU: the compile-only lane collapses every category into verdict_compile, so it exercises neither classify() nor the standard-category success marker. A `standard` example that verifies its results but prints no SUCCESS/PASS/Complete marker is reported as FAIL (no success marker). That landed two days ago: 981b9eb added a marker to disjoint_from_raw_parts on main after NVIDIA#670 (the new example) and NVIDIA#665 (stricter verdicts) merged in one batch. Nothing in an example's own directory says a marker is required, and its author cannot see the consequence without hardware. Separately, classify() falls through to `standard` for anything its seven arrays do not claim, so a misspelled or renamed entry does not fail -- it matches nothing and the example quietly gets the wrong verdict rules. All 45 entries across the 11 arrays are valid today, so that half is preventive. Add scripts/check-example-smoketest-contract.sh and run it from status-guard.yml, next to the existing guard that keeps ERROR_EXAMPLES and STATUS.md in step. It reads sources only: no cargo, no toolkit, no LLVM. The guard duplicates two of verdict_standard's greps, so it pins that coupling: if smoketest.sh stops grepping SUCCESS|PASS|Complete, or changes the skip pattern, the guard says so instead of quietly checking a contract that no longer exists. Following NVIDIA#643 it also fails closed on a missing python3 and on a parse self-test, rather than reporting success from a check that could not run. Fixes NVIDIA#682 Signed-off-by: Vyncint Ng <[email protected]>
nihalpasham
pushed a commit
that referenced
this pull request
Aug 7, 2026
…#683) scripts/smoketest.sh assumes two things about the examples that nothing verified, and neither is reachable without a GPU: the compile-only lane collapses every category into verdict_compile, so it exercises neither classify() nor the standard-category success marker. A `standard` example that verifies its results but prints no SUCCESS/PASS/Complete marker is reported as FAIL (no success marker). That landed two days ago: 981b9eb added a marker to disjoint_from_raw_parts on main after #670 (the new example) and #665 (stricter verdicts) merged in one batch. Nothing in an example's own directory says a marker is required, and its author cannot see the consequence without hardware. Separately, classify() falls through to `standard` for anything its seven arrays do not claim, so a misspelled or renamed entry does not fail -- it matches nothing and the example quietly gets the wrong verdict rules. All 45 entries across the 11 arrays are valid today, so that half is preventive. Add scripts/check-example-smoketest-contract.sh and run it from status-guard.yml, next to the existing guard that keeps ERROR_EXAMPLES and STATUS.md in step. It reads sources only: no cargo, no toolkit, no LLVM. The guard duplicates two of verdict_standard's greps, so it pins that coupling: if smoketest.sh stops grepping SUCCESS|PASS|Complete, or changes the skip pattern, the guard says so instead of quietly checking a contract that no longer exists. Following #643 it also fails closed on a missing python3 and on a parse self-test, rather than reporting success from a check that could not run. Fixes #682 Signed-off-by: Vyncint Ng <[email protected]>
nihalpasham
pushed a commit
that referenced
this pull request
Aug 21, 2026
…a pass (#1112) `has_skip_marker` accepts `skipping:` and nothing else. The convention it is implementing has two spellings, and `scripts/smoketest.sh` -- which owns it -- accepts both: if grep -qiE '^[[:space:]]*(skipping:|pass \(skipped\))' "${log}"; then Its own comment names the second form in so many words: "`PASS (skipped): ...` form below sm_75". `generated_ldmatrix` prints exactly that: println!( "PASS (skipped): ldmatrix.m8n8.x4.b16 requires sm_75+; device is sm_{major}{minor}" ); An example declining that way exits 0 and prints no mismatch marker, so `run_binary` classifies the run `RunKind::Pass`. That matters because the campaign gates on it: if !matches!(baseline.kind, RunKind::Pass) { ... println!("schedule-fuzz: BASELINE FAILURE: {:?}; no schedule variants were run", ...) With the right kind the campaign stops there and says so. With `Pass` it proceeds: it patches the PTX, sweeps every seed, and each variant declines identically -- same exit code, same output, so not even `OutputChanged` fires. The campaign reports a clean sweep of a kernel that never launched. This is #665's bug in the second consumer of the same convention. That fix put it as "a skip the function fails to recognise is not merely missing its `(skipped)` annotation -- it is promoted to a full execution PASS", and taught `verdict_standard` the second spelling. `ptx-schedule`'s campaign arrived later (#1065) with only the first. A silent all-clear is the worst outcome available to a bug-finding tool, and it is the one this produces on any device below an example's floor. Hoist both spellings into a `SKIP_MARKERS` constant and check the line against each, with the coupling to the smoketest's pattern recorded next to it. Case-insensitivity is unchanged and already correct: `run_binary` lowercases before classifying, which is what makes this match the smoketest's `grep -i`. Two tests: both spellings are recognised with and without leading whitespace, and the near-misses are not -- a bare `pass`, `pass: 1024 elements verified`, `success`, and a mid-line `no skipping: here`, since the marker is anchored to the start of the line in the smoketest too. Both fail with the second marker removed. Verified: 11 tests pass, fmt clean, `clippy --all-targets -- -D warnings` clean, and `cargo doc --document-private-items` clean. Signed-off-by: Vyncint Ng <[email protected]>
nihalpasham
pushed a commit
to vyncint/cuda-oxide
that referenced
this pull request
Aug 23, 2026
…ailure `RunKind::Skipped` became reachable in NVIDIA#1112, when `has_skip_marker` learned the second spelling examples use to decline. Nothing consumes it distinctly. Both places that read the baseline test for `Pass` and treat everything else alike: if !matches!(baseline.kind, RunKind::Pass) { ... println!("schedule-fuzz: BASELINE FAILURE: {:?}; ...") Ok(summary) if !matches!(summary.baseline.kind, RunKind::Pass) => { eprintln!("Error: baseline example did not pass; ..."); std::process::exit(1); } So `cargo oxide fuzz-schedule redux_f32` on anything below sm_100a prints `BASELINE FAILURE: Skipped`, then `Error: baseline example did not pass`, and exits 1. The example did not fail. It ran, declared it cannot run on this device, and exited 0 -- which is precisely what `scripts/smoketest.sh` reports as `PASS (skipped)`. NVIDIA#665 exists because reporting a decline as anything else made an arch-gated example indistinguishable from a broken one, and this is the same conflation in the campaign: sweeping a fleet, "below this example's arch floor" comes back red alongside a genuinely wedged device. Rather than repeat a `matches!` in two crates, the distinction becomes one typed definition: `RunKind::baseline_verdict()` returns `Usable`, `Declined` or `Broken`, and the campaign and the CLI both consult it. The match is exhaustive, so a new `RunKind` cannot join a class by accident -- adding one now fails with E0004 instead of silently reading as broken. Behaviour: `Declined` prints `BASELINE DECLINED` and, in the CLI, a `Note:` on stderr with exit **0**. Every other non-`Pass` baseline keeps `BASELINE FAILURE` and exit 1, now with the kind in the message so the reader knows whether it hung, crashed or wedged. `--fail-on-finding` is untouched and remains the switch for failing on real findings. If you would rather a decline carry a distinct nonzero code, that is a one-line change in the new arm. Two tests: the three classes pinned exhaustively over all eight `RunKind` variants, and that every *finding* kind is a `Broken` baseline -- a mismatch is a finding in a variant, but as the baseline it means there is no ground truth to compare against. The first fails with `Skipped` moved back into the broken class. Verified: 16 ptx-schedule tests and 177 cargo-oxide tests pass, fmt clean, `clippy --all-targets -- -D warnings` clean on both crates, and `cargo doc --document-private-items` clean. Signed-off-by: Vyncint Ng <[email protected]>
nihalpasham
added a commit
that referenced
this pull request
Aug 23, 2026
…ailure (#1135) * fix(ptx-schedule): an example that declines to run is reported as a failure `RunKind::Skipped` became reachable in #1112, when `has_skip_marker` learned the second spelling examples use to decline. Nothing consumes it distinctly. Both places that read the baseline test for `Pass` and treat everything else alike: if !matches!(baseline.kind, RunKind::Pass) { ... println!("schedule-fuzz: BASELINE FAILURE: {:?}; ...") Ok(summary) if !matches!(summary.baseline.kind, RunKind::Pass) => { eprintln!("Error: baseline example did not pass; ..."); std::process::exit(1); } So `cargo oxide fuzz-schedule redux_f32` on anything below sm_100a prints `BASELINE FAILURE: Skipped`, then `Error: baseline example did not pass`, and exits 1. The example did not fail. It ran, declared it cannot run on this device, and exited 0 -- which is precisely what `scripts/smoketest.sh` reports as `PASS (skipped)`. #665 exists because reporting a decline as anything else made an arch-gated example indistinguishable from a broken one, and this is the same conflation in the campaign: sweeping a fleet, "below this example's arch floor" comes back red alongside a genuinely wedged device. Rather than repeat a `matches!` in two crates, the distinction becomes one typed definition: `RunKind::baseline_verdict()` returns `Usable`, `Declined` or `Broken`, and the campaign and the CLI both consult it. The match is exhaustive, so a new `RunKind` cannot join a class by accident -- adding one now fails with E0004 instead of silently reading as broken. Behaviour: `Declined` prints `BASELINE DECLINED` and, in the CLI, a `Note:` on stderr with exit **0**. Every other non-`Pass` baseline keeps `BASELINE FAILURE` and exit 1, now with the kind in the message so the reader knows whether it hung, crashed or wedged. `--fail-on-finding` is untouched and remains the switch for failing on real findings. If you would rather a decline carry a distinct nonzero code, that is a one-line change in the new arm. Two tests: the three classes pinned exhaustively over all eight `RunKind` variants, and that every *finding* kind is a `Broken` baseline -- a mismatch is a finding in a variant, but as the baseline it means there is no ground truth to compare against. The first fails with `Skipped` moved back into the broken class. Verified: 16 ptx-schedule tests and 177 cargo-oxide tests pass, fmt clean, `clippy --all-targets -- -D warnings` clean on both crates, and `cargo doc --document-private-items` clean. Signed-off-by: Vyncint Ng <[email protected]> * fix(ptx-schedule): pin baseline and CLI verdict policy Keep stronger process failures ahead of skips and make the CLI distinction between declined, broken, and finding-bearing campaigns explicit and testable. Signed-off-by: nihalp <[email protected]> --------- Signed-off-by: Vyncint Ng <[email protected]> Signed-off-by: nihalp <[email protected]> Co-authored-by: nihalp <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #656. This is the
smoketest.shhalf of that issue; #658 fixed the example-side half and deliberately left the script untouched.Touches one file, so it does not overlap #664.
What was wrong
verdict_standarddecides a barePASSfromgrep -qE 'SUCCESS|PASS|Complete'over the whole log. Skip declarations routinely contain those words, so a skip the function fails to recognise is not merely missing its(skipped)annotation — it is promoted to a full execution PASS, indistinguishable in the summary from an example that launched kernels and verified results.Three cases all reported a clean
PASS:wgmma_mma_bf16never launchesmainonly prints; module doc says "compilation and PTX generation only. Do not launch this kernel." Yet it is instandard, whose contract is that execution succeedsgenerated_ldmatrixprintsPASS (skipped): …skipping:, so the line fell through to the success grep, which matched its ownPASSSkipping:I am being explicit about the third row: nothing triggers it today, so matching case-insensitively is purely defensive. It is included because it is the same fall-through that produced two of the original false passes in #656, and the next example to capitalise the word would silently get a full PASS again.
What this changes
NO_LAUNCH_EXAMPLES=(wgmma_mma_bf16)and reportPASS (compiled, no launch)for it, mirroring the existingverify_nvvm_in_compile_onlyhelper shape.${ex}intoverdict_standard, as the dispatch already does forverdict_error.wgmma_mma_bf16stays instandardon purpose. It cannot move toWGMMA_EXAMPLES—verdict_wgmma's gate patterns (WARNING: WGMMA requires,PTX load failed (expected on non-Hopper), …) match none of its output, so it would land onFAIL (wgmma, no success marker). Andblackwell-compile, the existing always-compile-only category, carries a bespoke dual-routerun_cargobranch specific togenerated_intrinsics_blackwell. The build and host binary genuinely must succeed here; only the label was wrong.Verification
No GPU was used, and none is needed: the
verdict_*functions are pure by design — "Eachverdict_*function consumes a log file + exit code … They never run cargo themselves". I extracted the realverdict_standard,grep_failure_markers, andexample_never_launchesfrom the script and drove them with synthetic logs.PASSPASSskipping:PASS (skipped)PASS (skipped)Skipping: … -- PASS (skipped)PASSPASS (skipped)PASS (skipped): ldmatrix… requires sm_75+PASSPASS (skipped)wgmma_mma_bf16no-launch outputPASSPASS (compiled, no launch)FAIL (no success marker)panicked at)FAIL (failure marker in output)FAIL (exit=1)FAIL (crashed, signal 11)The three bold rows are the fix; the other six confirm nothing else moved.
I also checked that no other example is reclassified: of the 14 self-gating message forms across the examples, 13 already use lowercase
skipping:and onlygenerated_ldmatrixuses thePASS (skipped)spelling. No example prints a capitalisedSkipping:any more.The summary tallies on the verdict function's return code, not on parsing the label, so the new string changes no counts.
bash -nis clean, and both sibling guards (check-error-example-status.sh, which parsesERROR_EXAMPLESout of this same file, andcheck-dependency-licenses.sh) still pass.Scope note on CI
Compile-only runs collapse every category into
verdict_compile, so the GPU-lessexamples-compilelane never reachesverdict_standard. This change affects real-GPU runs only, which is also why it cannot be exercised by upstream CI.One maintenance note: if
wgmma_mma_bf16ever starts launching, itsNO_LAUNCH_EXAMPLESentry should go. The failure mode of forgetting is understating a genuine execution pass asPASS (compiled, no launch), not a false pass.