Repository navigation
Description
Description
scripts/smoketest.sh classifies an example as standard by default, and the standard contract is execution must succeed (smoketest.sh:321). Nothing in the script gates that on compute capability — each example is expected to self-declare a skip by printing skipping:. That self-declaration is incomplete and inconsistent, so on a pre-Ampere GPU the suite reports two examples as passing when they executed nothing, two as failing when they did exactly the right thing, and eight as hard failures.
I ran the full suite on a Tesla T4 (sm_75): 178 examples, 1515s, 11 failures. Upstream CI compiles examples without executing them, so none of this is reachable from ubuntu-latest.
1. Two examples report a full PASS without executing
cp_async_small and cp_async_zfill guard correctly in host code, but print a capitalised marker:
Running `target/oxide-examples/release/cp_async_small`
=== cp.async small-copy example (4-byte and 8-byte) ===
Skipping: cp.async requires sm_80+, device is sm_75 -- PASS (skipped)
smoketest verdict: PASS — not PASS (skipped).
Two things go wrong in sequence:
- the skip check at
smoketest.sh:333isgrep -qE '^[[:space:]]*skipping:', which is case-sensitive and does not matchSkipping:; - the example is then rescued by the success check at
:337,grep -qE 'SUCCESS|PASS|Complete', because its message contains the substringPASS.
So it is counted as a genuine execution pass, indistinguishable in the summary from an example that ran and validated results. The comment at :329-332 says examples may gate themselves "without having to fake a success marker" — these two do exactly that, and pass only by accident. Reword the message without the word PASS and both would report FAIL (no success marker).
2. Two examples report FAIL despite behaving correctly
tma_copy checks capability, falls back to verify_ptx_only, and exits 0:
⚠️ WARNING: TMA requires sm_90+ (Hopper or newer)
ℹ️ PTX load failed (expected on pre-Hopper): DriverError(218, "a PTX JIT compilation failed")
tma_multicast has the skipping: marker, but in the wrong branch. Its driver-error fallback prints it (main.rs:181), directly under a comment (:178-180) explaining it is there so "smoketest's failure-marker scan doesn't flag this as a regression". The early capability check at :154 omits it:
⚠️ TMA multicast requires sm_100a (Blackwell datacenter).
Your GPU is sm_75. Use: cargo oxide run tma_copy
On sm_75 the capability path wins, so the intent recorded in that comment is defeated. Both report FAIL (no success marker).
3. Eight standard examples fail with no working guard
| example | cause | exit |
|---|---|---|
barrier |
mbarrier (sm_80), no guard | 101 (panic main.rs:132) |
future_apis |
mbarrier (sm_80), no guard | 1 |
mcast_barrier_test |
cluster + multicast (sm_90), no guard | 1 |
coop_groups_demo |
cluster (sm_90), no guard | 101 (panic main.rs:672) |
generated_intrinsics |
bf16 (sm_80), no guard | 101 (panic main.rs:1260) |
cvt_f16x2 |
packed f16 conversions, no guard | 1 |
clc |
guard only warns, then continues | 101 (panic main.rs:205) |
cutile_inter_kernel |
cuTile toolchain has no sm_75 support | 101 |
The first seven fail with DriverError(218, "a PTX JIT compilation failed"). cutile_inter_kernel fails earlier, inside the third-party toolchain:
tileiras failed (exit exit status: 1) for gpu sm_75:
stderr: tileiras: for the --gpu-name option: Cannot find option named 'sm_75'!
4. wgmma_mma_bf16 is compile-only but categorised standard
It prints SUCCESS: BF16 WGMMA deferred accumulator lowering compiled. and never launches, yet sits in the category whose contract is execution must succeed. WGMMA_EXAMPLES contains only wgmma (smoketest.sh:52).
Expected behavior
On a GPU below an example's required compute capability, the example reports PASS (skipped) and the suite says so; an example that handles the case correctly is never reported as FAIL.
Actual behavior
Two false passes, two false failures, eight hard failures, and one compile-only example counted as an execution pass.
Environment
- GPU: Tesla T4 (sm_75, 15360 MiB)
- CUDA driver version: 595.71.05
- nvcc:
Build cuda_13.2.r13.2/compiler.37434383_0 - Rust toolchain:
nightly-2026-04-03(perrust-toolchain.toml) - Source revision:
e28248c1
Suggested direction
Two independent parts:
Harness (smoketest.sh) — these are bugs regardless of what the examples do:
- make the skip check case-insensitive, or keep requiring the documented lowercase form and fix the two examples that don't use it. (The check order is already right —
:333runs before:337; what lets a skip through as a full pass is the case-sensitive match falling through to a success test that accepts a barePASSsubstring anywhere in the log.) - consider tightening that success marker.
grep -qE 'SUCCESS|PASS|Complete'matching anywhere in the output is what rescued these two examples into a green result; anchoring it would make a missing marker fail loudly instead of being papered over by incidental text. - move
wgmma_mma_bf16intoWGMMA_EXAMPLES.
Examples — give the eight unguarded ones the same skipping: guard the other 13 already use, and move tma_multicast's marker into its capability branch. I prefer this over a declarative example -> minimum sm table in the script, because these examples are broken for anyone on older hardware running them directly, not just for the test suite: a table would make the suite green while cargo oxide run barrier still panics in a user's face.
Happy to implement this if you agree with the split, or to take the table approach instead if you'd rather have the requirements in one enforceable place.
Additional context
There may be a related compiler-side question. Every DriverError(218) failure above shows Detected GPU arch: sm_75 (via nvidia-smi), i.e. the backend built for the detected arch and emitted instructions the Turing JIT rejects, rather than raising the target to the required floor. commands.rs:1058-1061 describes the intent as "the backend builds for the required arch and the module simply skips at load time", and intrinsics/catalog.json records per-selection predicates such as Subtarget->getSmVersion() >= 90. generated_intrinsics fails this way too, so it is not limited to hand-written wrappers. I have not investigated whether this is a gap or intended, and did not want to fold it into this issue — happy to open a separate one if it is worth pursuing.
Activity
vyncint commentedon Aug 4, 2026
Opened #658 for the example-side half of this (the eleven examples that misreport). It leaves
smoketest.shuntouched.Two corrections to my own suggestions above, found while implementing:
Suggestion 3 does not work. Moving
wgmma_mma_bf16intoWGMMA_EXAMPLESwould not fix it. Its output (SUCCESS: BF16 WGMMA deferred accumulator lowering compiled.) matches none of the non-Hopper markers atsmoketest.sh:475, so it falls through to:488and reportsPASS (wgmma, executed)— as untrue as the currentPASS. The real question is whether a compile-only wgmma bucket should exist alongsideblackwell-compile, which is a call for you rather than a relabel. Left out of #658.cutile_inter_kernelis also left out. It fails inside the third-party toolchain (tileiras: for the --gpu-name option: Cannot find option named 'sm_75'!), and I do not know cuTile's actual floor. Guessing one seemed worse than leaving it unguarded and visible.The remaining harness item is the success check accepting
SUCCESS|PASS|Completeanywhere in the output, which is what let the two false passes through. That is a change with blast radius across every example, so I have not touched it — happy to if you want it.fix(examples): gate arch-dependent examples on compute capability (#658)
vyncint commentedon Aug 5, 2026
Ran the full suite on an A10G (sm_86) as well, which resolves the
cutile_inter_kernelquestion I left open above and puts the rest of this issue on a firmer footing. 3 failures / 178, against 11 on sm_75.cutile_inter_kernelneeds no guardIt passes on sm_86 (119s, real execution). So cuTile's floor is above sm_75 and at or below sm_86 — and since this project's documented minimum is Ampere (
cuda-oxide-book/getting-started/installation.md:12— "NVIDIA GPU | Ampere+ (sm_80+)"), it only fails below the supported range. No guard is warranted; the honest answer is "not a bug", not the invented floor I declined to write. Please disregard that bullet from the issue body.The guards hold in both directions
@nihalpasham's CC 12.0 check confirmed no guard misfires at the top of the range. sm_86 tests the other direction at the same time — sm_80-floor examples must run, sm_90/sm_100-floor examples must skip:
barriercp_async_smallPASScp_async_zfillPASScvt_f16x2cvt_packedbf16x2_fmagenerated_intrinsicscoop_groups_democlusterclctma_copyFAILtma_multicastFAILThis also brackets
cvt_f16x2empirically: it fails at sm_75 and executes at sm_86, so the sm_80 floor I inferred fromcvt_packed's precedent is neither too high nor too low.Scope note I should have made when filing
sm_75 is below the documented
sm_80+minimum, so the six sm_80-floor guards only change behaviour on unsupported hardware. The sm_90 and sm_100 ones do not:tma_copyandtma_multicastproduce a falseFAIL, andcoop_groups_demo,mcast_barrier_testandclcfail outright, on any supported Ampere or Hopper device. Five of the eleven are therefore in scope regardless of what one thinks of Turing.Still failing on sm_86, tracked elsewhere
vectorization— vectorization: f32x4_view_copy accesses lower to generic space, not .global #657, same twof32x4_view_copyassertions. Worth noting it fails on the exact architecture that module's docs cite for their measurements ("Measured on sm_86",crates/cuda-device/src/vector.rs:30), so that one is not a Turing artifact either.future_apis— fails withDriverError(218)on sm_86 even after forcing a full backend rebuild. Its PTX is emitted as.target sm_100while the only arch-sensitive instructions in it arembarrier.{init,arrive,test_wait,inval}(sm_80), so the guard I added is gating the wrong thing. I do not yet understand why the target is raised to sm_100, and will file it separately rather than guess — it looks like the same target-selection question I raised under "Additional context" above, seen from the other side.Hardware:
nvidia-smireportsNVIDIA A10G, 8.6. All 178 examples, ate28248c1plus #658.vyncint commentedon Aug 5, 2026
Measured the harness half, and it retires my own suggestion (2) above — tightening the success marker is not a small change, and the looseness turns out to be load-bearing.
Why anchoring does not work
148 of the 178 examples print a success marker, in 293 distinct strings. Of those:
^-anchored match — they lead with a space, a newline,✓,===,[, or⚠SUCCESS/PASS/CompleteA sample of the shapes actually in use:
The part that actually matters
PASSis not only a final verdict here. Several examples print[PASS]orPASS {name}per sub-test, so any rule keyed on the token appearing somewhere cannot distinguish "all 20 cases passed" from "19 printed PASS and the 20th did not print anything". Anchoring does not fix that either —PASS {name}: ...is anchored and per-case.So a stricter marker is not a regex change. It needs a declared final-verdict convention — one line, emitted once, e.g.
RESULT: PASS— adopted across 148 examples, with the loose match kept until every one has it. That is a much larger and more invasive change than the false-pass it would prevent, which is why I am not proposing it.What does protect the current rule is
grep_failure_markersrunning first: an example that prints 19[PASS]lines and then fails still tripsFAIL,✗, a panic, or a non-zero exit. The two false passes in this issue slipped through only because those examples printed a fake success marker of their own (-- PASS (skipped)), which #658 removed.Suggest closing suggestion (2) as won't-fix unless you want the convention change, in which case it deserves its own issue. That leaves
wgmma_mma_bf16's category as the one open harness item here — and per my earlier comment, moving it toWGMMA_EXAMPLESwould just relabel itPASS (wgmma, executed), which is equally untrue, so it needs a decision about whether a compile-only wgmma bucket should exist at all.All of the above is static analysis of the example sources — no GPU, no execution.
fix(examples): future_apis needs sm_90, not sm_80 (#666)
test(smoketest): stop reporting a skipped or never-launched example a…