Repository navigation
docs(cuda-device): the Modules table names 17 of the crate's 39 public modules - #1045
Merged
nihalpasham merged 2 commits intoAug 19, 2026
Merged
Conversation
…c modules
`src/lib.rs` declares 39 `pub mod`. The README's "## Modules" table lists 17
of them, and the other 22 appear nowhere in the file -- not in the table, not
in the diagram, not in prose:
access async_copy bf16 bf16x2 constant convert dotprod f16
f16x2 f32x2 float i16x2 iket int mma_frag prmt
ptx swizzle uniform vector view wmma
None is `#[doc(hidden)]` and none is `#[cfg]`-gated, so all 22 are ordinary
public API of a published crate. Between them they hold the packed-type
families (`f16x2`, `bf16x2`, `i16x2`, `f32x2`), the register matrix ops
(`wmma`, `mma_frag`), constant memory, inline PTX, the swizzle and
transaction-width helpers, and the checked view/witness types -- so a reader
using this table as the crate's index misses most of it.
Every listed name in the existing table is a real module and every
description matches, so the table is an inventory rather than a sampling; it
is simply 22 rows short. Add them in a second table, with each description
taken from that module's own `//!` summary.
The additions carry no GPU column. The floor for these is per function, not
per module -- `int` holds both an intrinsic-free scalar min/max and the
`sm_90+` `min.relu.s32` -- so inventing a per-module floor would be less
accurate than pointing at the rustdoc, which states it per item. Where a
module's own documentation names an architecture the row keeps it (`f32x2` is
native SM100, `int`'s relu clamps are `sm_90+`).
The first table, its GPU column and the ASCII diagram are untouched: this
commit is insertions only. The diagram's `stmatrix` is not a module (it is
part of `tcgen05`, as that table row already says) and `coop_grps` is an
abbreviation, but both read as feature labels in a picture rather than
inventory claims, so they are left alone.
Verified: the README's 39 backticked module rows and `src/lib.rs`'s 39
`pub mod` declarations are now the same set, with nothing in the tables that
is not a module.
Signed-off-by: Vyncint Ng <[email protected]>
…le inventory intro
Collaborator
|
nihalpasham
added a commit
that referenced
this pull request
Aug 21, 2026
* docs(ptx-schedule): the one published crate with no README `ptx-schedule` arrived with #1065 and is the only publishable crate in the workspace with neither a `readme` key nor a README.md on disk. Checked across `cargo metadata`: every other publishable member has both. crates.io renders that file as the package page, so this one would publish with an empty body. This is the same gap #981 closed for `ptx-parse`, and the README follows that one's shape. Content is taken from the crate rather than from the commit that added it: - The purpose and the "owns neither CUDA execution nor an input generator" boundary come from `lib.rs`'s module header. - The seven `SiteKind` variants and the eight campaign `RunKind` verdicts are each enumerated in full, since a partial list of a closed enum is the thing that rots (#978, #1045, #1056). - `InjectionOptions`' four fields, `DEFAULT_MAX_SLEEP_NS` (64 µs), the `nanosleep.u32` insertion, and the `confirm_runs` re-run before a finding is reported are all as implemented. - `cargo oxide fuzz-schedule` is named as the user-facing entry point, with the crate's own binary shown for single-file work; the flags in the example come from `main.rs`'s usage string. One detail carried over from #981's review: the License link is absolute rather than `../../LICENSE`, because crates.io rewrites relative README links against the repository root and the relative form 404s there. Verified: `cargo metadata` now reports `readme: README.md` for the crate and the file resolves; all seven `SiteKind` and eight `RunKind` names appear; `check-crate-inventory.sh`, `check-spdx-headers.sh` and `check-book-api-names.sh` pass; no relative `../` links remain. Signed-off-by: Vyncint Ng <[email protected]> * docs(ptx-schedule): align the README with the code it describes Six statements did not match the crate as it stands: - the execution disclaimer claimed the whole crate owns no CUDA execution while campaign.rs two sections down builds, launches, watchdogs and assigns verdicts; the section now scopes the claim to analyze_ptx/perturb_ptx and points at the campaign layer; - intensity is a probability dial (0.75 x intensity per site, and it scales the drawn sleep lengths), not a fraction of sites touched; - focus re-weights selection by substring over each site's opcode and instruction text (0.95x hits, 0.15x misses); it never restricts the sweep to one callable; - Skipped is assigned only when the example prints a skip marker; a zero-injection seed still runs and reports like the baseline; - findings are reported with their confirmation counts attached, not gated on confirmation; - a seed pins the rewrite, not the schedule the GPU then picks. Smaller table fixes from the same read of classify_instruction: the Barrier row now names mbarrier.*, OrderedMemory names the ordering qualifiers it actually matches (a scope alone never classifies), the Backedge row describes the conservative same-or-earlier-block test (no dominance is computed), and the block-index field is called out as back-edge-only. The injection knobs move into a bulleted list so each one can state its own semantics. --------- Signed-off-by: Vyncint Ng <[email protected]> Co-authored-by: nihalpasham <[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.
src/lib.rsdeclares 39pub mod. The README's## Modulestable lists 17 of them, and the other 22 appear nowhere in the file — not in the table, not in the ASCII diagram, not in prose:None is
#[doc(hidden)]and none is#[cfg]-gated, so all 22 are ordinary public API of a published crate. Between them they hold the packed-type families (f16x2,bf16x2,i16x2,f32x2), the register matrix ops (wmma,mma_frag), constant memory, inline PTX, the swizzle and transaction-width helpers, and the checked view/witness types — so a reader using this table as the crate's index misses most of it.Why this is an inventory and not a sample
Every name in the existing table is a real module and every description matches its module, so the table reads as the inventory; it is simply 22 rows short. The additions go in a second table, with each description taken from that module's own
//!summary line.No GPU column on the additions
The floor for these is per function, not per module —
intholds both an intrinsic-free scalar min/max and thesm_90+min.relu.s32— so inventing a per-module floor would be less accurate than pointing at the rustdoc, which states it per item. Where a module's own documentation names an architecture the row keeps it (f32x2is native SM100,int's relu clamps aresm_90+).I checked whether the floors could be derived mechanically and they cannot: grepping
sm_across these files returns measurement notes ("measured on sm_86") as often as requirements, so filling that column would have meant guessing.Deliberately untouched
This commit is insertions only — the first table, its GPU column and the diagram are unchanged. The diagram's
stmatrixis not a module (it is part oftcgen05, as that table row already says) andcoop_grpsis an abbreviation, but both read as feature labels in a picture rather than inventory claims, so they are left alone.Verification
The README's 39 backticked module rows and
src/lib.rs's 39pub moddeclarations are now the same set, with nothing in the tables that is not a module. Both counts re-measured againstf1e62fe2. Book builds clean undersphinx-build -W;check-book-api-names.shpasses.