Repository navigation
docs(mir-lower): make the in-source intrinsics table a set of links the docs gate checks - #995
Merged
Conversation
…he docs gate checks NVIDIA#977 fixed this table in `README.md`. The same table lives in `convert/intrinsics/mod.rs` as a module doc comment, rustdoc renders it, and it had the same two dead rows and the same fourteen omissions. The interesting part is how it survived. Every live row was an intra-doc link and the two dead ones were plain code spans: //! | [`wgmma`] | Warpgroup MMA | Inline PTX | SM 90+ | //! | `tcgen05` | 5th-gen Tensor Core | Inline PTX | SM 100+ | //! | `stmatrix` | Matrix store | Inline PTX | SM 90+ | 6a9a637 (NVIDIA#406) made exactly that edit when it deleted those two modules: -//! | [`tcgen05`] | 5th-gen Tensor Core | Inline PTX | SM 100+ | +//! | `tcgen05` | 5th-gen Tensor Core | Inline PTX | SM 100+ | -//! | [`stmatrix`] | Matrix store | Inline PTX | SM 90+ | +//! | `stmatrix` | Matrix store | Inline PTX | SM 90+ | The docs gate runs `RUSTDOCFLAGS="-D warnings"`, so leaving the links in would have failed the build. Downgrading them to plain spans was the smallest edit that kept CI green -- and it converted a row rustdoc was checking into a row nobody was. The gate caught the link; silencing the gate kept the claim. So this does not just correct the rows, it puts them back under the gate. All 24 modules are `pub mod`, so every row is now a link, and the table cannot rot the way it just did without the build going red. Verified both directions: * clean tree: `RUSTDOCFLAGS="-D warnings" cargo doc --no-deps -p mir-lower` passes with all 24 links resolving. * add one linked row for the deleted `stmatrix`, changing nothing else: error: unresolved link to `stmatrix` --> crates/mir-lower/src/convert/intrinsics/mod.rs:86:9 error: could not document `mir-lower` which is precisely the failure NVIDIA#406 had to work around. Descriptions come verbatim from each module's own `//!` line, the same source NVIDIA#977 used for the README, so the two tables now say the same thing rather than drifting apart again. The `Lowering` and `Min SM` columns go for the reason NVIDIA#977 dropped them: they were per-module guesses at per-intrinsic properties the catalog already records. One thing that is deliberately *not* a link: `convert/generated_intrinsics.rs`, which handles everything the catalog describes. It is a private `mod`, so `[`super::generated_intrinsics`]` fails the same gate with `private-intra-doc-links`. It is named as a path, and the doc says why. Verified: table rows are exactly the 24 files in `convert/intrinsics/` with no ghost and no missing; `cargo test -p mir-lower` and `clippy --all-targets` are clean; the docs gate passes. Signed-off-by: Vyncint Ng <[email protected]>
Collaborator
|
nihalpasham
approved these changes
Aug 19, 2026
3 of 4 tasks
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.
Summary
#977 fixed this table in
README.md. The same table lives inconvert/intrinsics/mod.rsas a module doc comment, rustdoc renders it, and it had the same two dead rows and the same fourteen omissions.The interesting part is how it survived. Every live row was an intra-doc link and the two dead ones were plain code spans:
6a9a6373(#406) made exactly that edit when it deleted those two modules:The docs gate runs
RUSTDOCFLAGS="-D warnings", so leaving the links in would have failed the build. Downgrading them to plain spans was the smallest edit that kept CI green — and it converted a row rustdoc was checking into a row nobody was. The gate caught the link; silencing the gate kept the claim.So this puts the rows back under the gate
All 24 modules are
pub mod, so every row is now a link and the table cannot rot the way it just did without the build going red. Verified both directions:RUSTDOCFLAGS="-D warnings" cargo doc --no-deps -p mir-lowerpasses, all 24 links resolving.stmatrix, nothing else changed:which is precisely the failure #406 had to work around.
Descriptions come verbatim from each module's own
//!line — the same source #977 used for the README — so the two tables now say the same thing rather than drifting apart again.LoweringandMin SMgo for the reason #977 dropped them: per-module guesses at per-intrinsic properties the catalog already records.One thing deliberately not a link:
convert/generated_intrinsics.rs, which handles everything the catalog describes. It is a privatemod, so[super::generated_intrinsics]fails the same gate withprivate-intra-doc-links. It is named as a path, and the doc says why.Testing
Local, no GPU.
convert/intrinsics/, no ghost and no missingcargo test -p mir-lower(353 tests) andclippy --all-targetscleancargo oxide run <example>— not applicable, doc comment only