Skip to content

docs(examples): three READMEs state a minimum GPU below their own runtime gate - #1017

Merged
nihalpasham merged 2 commits into
NVIDIA:mainfrom
vyncint:docs/example-minimum-gpu-matches-gate
Aug 19, 2026
Merged

nihalpasham merged 2 commits into
NVIDIA:mainfrom
vyncint:docs/example-minimum-gpu-matches-gate

Conversation

@vyncint

@vyncint vyncint commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Fourteen examples gate main on compute capability. Three of them also state a Minimum GPU in their README, and all three state one lower than the gate they ship with — so the README says the example runs on hardware where it prints skipping: and returns.

Example README said Gate in main() The gate's own message
future_apis Volta (sm_70) major < 9 "fence.proxy.async … requires sm_90+"
coop_groups_demo Volta (sm_70+) major < 9 "thread block clusters require sm_90+"
barrier Volta (sm_70) major < 8 "mbarrier requires sm_80+"

future_apis is the one with history: 8615368f corrected that gate to major < 9 during the #666 review — the requirement is fence.proxy.async, emitted by ManagedBarrier::init_by for every barrier kind, which ptxas rejects below sm_90, and the TmaBarrier typestate is inert PhantomData that detects nothing. The gate moved; the README did not.

In all three cases the sm_70 figure is not invented — it is the floor of one instruction family the example touches (mbarrier, or match.any.sync) rather than the floor for running the example. Each entry now states the real floor, cites the gate that enforces it, and keeps the sm_70 fact as the aside it always was, so the next reader does not have to reconcile them.

Every gate here is in main() and returns immediately, so this is the whole example's floor, not one test's.

Testing

Local, no GPU — documentation only.

  • Swept all 215 example READMEs: these three were the only ones whose stated Minimum GPU did not match a gate in their own main, and after this change none do
  • check-error-example-status and check-example-smoketest-contract pass
  • cargo oxide run <example> — not applicable; verifying the floors themselves would need Hopper and Ampere parts, which is why this takes each example's own gate as the authority rather than re-deriving it

vyncint and others added 2 commits August 18, 2026 17:55
…time gate

Fourteen examples gate `main` on compute capability. Three of them also state a
**Minimum GPU** in their README, and all three state one lower than the gate
they ship with -- so the README says the example runs on hardware where it
prints `skipping:` and returns:

  example            README said           gate in main()   gate's own message
  future_apis        Volta (sm_70)         major < 9        "fence.proxy.async ... requires sm_90+"
  coop_groups_demo   Volta (sm_70+)        major < 9        "thread block clusters require sm_90+"
  barrier            Volta (sm_70)         major < 8        "mbarrier requires sm_80+"

`future_apis` is the one with history: 8615368 corrected that gate to
`major < 9` during the NVIDIA#666 review -- the requirement is `fence.proxy.async`,
emitted by `ManagedBarrier::init_by` for every barrier kind, which ptxas
rejects below sm_90, and the `TmaBarrier` typestate is inert `PhantomData` that
detects nothing. The gate moved; the README did not.

In all three cases the sm_70 figure is not invented -- it is the floor of *one*
instruction family the example touches (mbarrier, or `match.any.sync`) rather
than the floor for running the example. Each entry now states the real floor,
cites the gate that enforces it, and keeps the sm_70 fact as the aside it
always was, so the next reader does not have to reconcile them.

Every gate here is in `main()` and returns immediately, so this is the whole
example's floor, not one test's.

Verified: swept all 215 example READMEs -- these three were the only ones whose
stated Minimum GPU did not match a gate in their own `main`, and after this
change none do. check-error-example-status and
check-example-smoketest-contract pass.

Signed-off-by: Vyncint Ng <[email protected]>
The three README floors from the parent commit were right, but four
asides still contradicted the runtime gates:

- barrier: the sm_70 mbarrier claim is libcu++'s software fallback,
  not the PTX instructions this example emits (those need sm_80+,
  matching cuda-device's barrier support notes)
- barrier: drop the Pre-Volta troubleshooting row; the sm_80 gate in
  main skips before any kernel could hit it
- coop_groups_demo: pre-Hopper devices never reach the combined
  cluster+cooperative message; main exits at its sm_90 skip line first
- future_apis: mbarrier instructions need sm_80+, and fence.proxy.async
  is what sets the sm_90 floor
@nihalpasham nihalpasham added documentation Improvements or additions to documentation cuda-feature A CUDA hardware/toolkit feature (TMA, tcgen05, WGMMA) examples Example kernels and host harnesses under crates/rustc-codegen-cuda/examples labels Aug 19, 2026
@nihalpasham

Copy link
Copy Markdown
Collaborator
  • Verified all three corrected floors against the gate each example ships (barrier sm_80, coop_groups_demo and future_apis sm_90) and against the instructions in the checked-in PTX.
  • One commit layered on: the new sm_70 mbarrier asides claimed the instructions exist below their PTX floor (libcu++'s sm_70 support is a software fallback; the emitted mbarrier needs sm_80+), and two passages unreachable behind the gates (the pre-Hopper combined-mode text and the Pre-Volta troubleshooting row) are gone.

@nihalpasham
nihalpasham merged commit a9e2e70 into NVIDIA:main Aug 19, 2026
47 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda-feature A CUDA hardware/toolkit feature (TMA, tcgen05, WGMMA) documentation Improvements or additions to documentation examples Example kernels and host harnesses under crates/rustc-codegen-cuda/examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants