Skip to content

docs(book): the Crate Map says "every one" and lists 15 of 28 - #970

Merged
nihalpasham merged 1 commit into
NVIDIA:mainfrom
vyncint:docs/book-crate-and-dialect-inventory
Aug 18, 2026
Merged

nihalpasham merged 1 commit into
NVIDIA:mainfrom
vyncint:docs/book-crate-and-dialect-inventory

Conversation

@vyncint

@vyncint vyncint commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

The Crate Map

architecture-overview.md's Crate Map opens:

cuda-oxide is split into focused crates. Here is every one and its role:

and then lists 15. The workspace has 27 members plus rustc-codegen-cuda, so 13 are absent:

cuda-intrinsics          cuda-intrinsics-gen    cuda-artifact-finalizer
cuda-oxide-codegen       oxide-artifacts        reserved-oxide-symbols
dialect-iket             iket-lower             dialect-ptx
ptx-parse                libnvvm-sys            nvjitlink-sys
fuzzer

This is the same gap scripts/check-crate-inventory.sh exists to prevent, one document over. That guard was written because dialect-iket and iket-lower were missing from README.md's Crate Overview — "1,700 lines of compiler across two crates, with no row between them." Both are missing here too, and the guard cannot see this table: it only reads README.md.

Roles are copied verbatim from README.md's Crate Overview rather than written fresh, so the two inventories agree word for word and the guarded one stays the single source of truth.

The dialect count

Two pages state how many pliron dialects cuda-oxide defines, and both predate dialect-iket and dialect-ptx (#917):

Location Says
architecture-overview.md:188 "cuda-oxide defines two dialects on top of pliron"
pliron.md:352 "cuda-oxide works with three dialects"

Neither is a count of everything; both are counts of the lowering path, which is what the surrounding prose goes on to describe. Rather than fold two off-path dialects into a "levels of abstraction" narrative where they do not belong, each claim is now scoped to the lowering path and names the other two so a reader knows they exist.

mlir-dialects.md carries the same claim in its opening and is fixed in a companion PR; this one does not touch that file, so the two do not overlap.

Testing

Local, no GPU.

  • The Crate Map matches the member list exactly by script — 28 listed, 28 actual, none missing and none extra
  • just book (sphinx-build -W --keep-going) succeeds
  • check-crate-inventory.sh and check-book-api-names.sh pass
  • cargo oxide run <example> — not applicable, documentation only

## The Crate Map

`architecture-overview.md`'s Crate Map opens "cuda-oxide is split into focused
crates. Here is every one and its role" and then lists 15. The workspace has
27 members plus `rustc-codegen-cuda`, so 13 are absent:

  cuda-intrinsics          cuda-intrinsics-gen    cuda-artifact-finalizer
  cuda-oxide-codegen       oxide-artifacts        reserved-oxide-symbols
  dialect-iket             iket-lower             dialect-ptx
  ptx-parse                libnvvm-sys            nvjitlink-sys
  fuzzer

This is the same gap `scripts/check-crate-inventory.sh` exists to prevent, one
document over. That guard was written because `dialect-iket` and `iket-lower`
were missing from README.md's Crate Overview -- "1,700 lines of compiler across
two crates, with no row between them". Both are missing here too, and the
guard cannot see this table because it only reads README.md.

Roles are copied verbatim from README.md's Crate Overview rather than written
fresh, so the two inventories agree word for word and the guarded one stays the
single source of truth. The table is now 28/28 against the member list.

## The dialect count

Two pages state how many pliron dialects cuda-oxide defines, and both predate
`dialect-iket` and `dialect-ptx` (NVIDIA#917):

  architecture-overview.md:188  "cuda-oxide defines two dialects on top of pliron"
  pliron.md:352                 "cuda-oxide works with three dialects"

Neither is a count of everything; both are counts of the lowering path, which
is what the surrounding prose goes on to describe. Rather than fold two
off-path dialects into a "levels of abstraction" narrative where they do not
belong, each claim is now scoped to the lowering path and names the other two
so a reader knows they exist. `dialect-iket` carries 7 ops and 2 types;
`dialect-ptx` is the structured terminal PTX dialect from NVIDIA#917.

`mlir-dialects.md` carries the same claim in its opening and is fixed in a
separate change; this one does not touch that file, so the two do not overlap.

Verified: the Crate Map matches the member list exactly (28 listed, 28 actual,
no missing and no extra, checked by script); `just book`
(`sphinx-build -W --keep-going`) succeeds; check-crate-inventory and
check-book-api-names pass.

Signed-off-by: Vyncint Ng <[email protected]>
@nihalpasham nihalpasham added the documentation Improvements or additions to documentation label Aug 18, 2026
@nihalpasham

Copy link
Copy Markdown
Collaborator

nihalpasham added a commit that referenced this pull request Aug 18, 2026
…ommands (#980)

* docs(cargo-oxide): the CLI crate's own README is missing two of its commands

`crates/cargo-oxide/README.md` has a `### cargo oxide <cmd>` section for 13 of
the 15 user-facing subcommands. `inspect` and `clean` have none:

  inspect   Build an example or project and print the generated PTX
  clean     Remove project-local build outputs and generated cuda-oxide artifacts

Both are in `cargo oxide --help`, so the CLI advertises them and its own
documentation does not explain them. `inspect` is the one worth having: it is
the quick way to see the finished PTX, which is what most people opening this
README are trying to do, and `pipeline` -- the verbose whole-pipeline dump --
is the only nearby thing documented.

This is the gap `scripts/check-cli-doc-coverage.sh` exists to prevent, one
file over. That guard reads the book's command reference and this README is
outside its scope, exactly as `check-crate-inventory.sh` reads README.md and
could not see the book's Crate Map in #970. Both new sections are written in
the existing house style, with the flags taken from `--help` rather than from
the clap source, so what is documented is what a user sees.

`materializer-handshake` stays undocumented on purpose: it is
`#[command(name = "__materializer-handshake", hide = true)]`, and the book
guard already accounts for it as "1 hidden one(s) correctly excluded".

Also: the Architecture section's source tree lists three files and `src/` has
four -- `artifact_identity.rs` was missing.

Checked while here and *not* changed: `cargo oxide bench` appears in this file
under a `## Future Commands` heading and is correctly absent from clap, and
`CUDA_OXIDE_MATERIALIZE_CUBIN` is real (`MATERIALIZE_CUBIN_ENV` in
`reserved-oxide-symbols`) and correctly described as internal.

Verified by script: the README's `###` command sections are now exactly the
set of non-hidden `Commands` variants (15 and 15, no missing and no ghost),
and the source tree matches `src/` exactly. `check-cli-doc-coverage.sh`
passes.

Signed-off-by: Vyncint Ng <[email protected]>

* docs(cargo-oxide): correct the inspect flag list

inspect does not accept --materialize-cubin; it does accept
--device-debug and --unchecked-indexing (main.rs Inspect variant).

---------

Signed-off-by: Vyncint Ng <[email protected]>
Co-authored-by: nihalpasham <[email protected]>
@nihalpasham
nihalpasham merged commit 9bad5bd into NVIDIA:main Aug 18, 2026
nihalpasham pushed a commit that referenced this pull request Aug 19, 2026
…DME's (#997)

The follow-up named in the #970 merge note.

`architecture-overview.md`'s Crate Map claims completeness outright --
"cuda-oxide is split into focused crates. Here is every one and its role" --
and listed 15 of 28 when #970 found it. Eleven of the thirteen absentees were
ordinary omissions; two were `dialect-iket` and `iket-lower`, the exact pair
whose absence from README.md is the reason this guard exists at all ("1,700
lines of compiler across two crates, with no row between them"). The guard
could not see the second table because it only ever read README.md.

One guard, two inventories now. The member list is parsed once and checked
against both, so a new crate cannot be absent from either without CI failing.

Design kept deliberately identical to the existing half:

* **Missing-only, both tables.** A member with no row fails; a row with no
  member does not. That is the direction the guard was designed around
  (`rustc-codegen-cuda` is deliberately listed in both and is not a workspace
  member), and it cannot false-positive on a future legitimate addition.
* **Per-table parse self-tests.** Each section must be found by heading and
  must yield at least 20 rows, so a renamed heading or a reflowed table fails
  loudly instead of passing vacuously -- the failure mode this script's own
  header warns about.
* **The remedy text differs per table**, because the fix does: README rows go
  in one of three grouped tables, while the book's role text should be copied
  from README's so the two inventories stay word-for-word identical (which is
  how #970 wrote them).

Verified by mutation, each case run against an otherwise clean tree:

  drop `dialect-iket` from the book's Crate Map   -> exit 1, names the crate
  drop `iket-lower` from README's Crate Overview  -> exit 1, unchanged behaviour
  drop one from each at once                      -> exit 1, reports both tables
  rename `## Crate Map` to `## Crates`            -> self-test fires, exit 1
  gut the book table's rows                       -> self-test fires, exit 1
  clean tree                                      -> OK, all 27 members in both

No wiring needed: `check-crate-inventory.sh` is already in status-guard.yml and
in the Justfile's `check-guards`, so extending the script extends both.

Signed-off-by: Vyncint Ng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants