Repository navigation
docs(mir-importer): five of twelve intrinsic modules in the README do not exist - #978
Merged
Merged
Conversation
… not exist `README.md`'s "`terminator/intrinsics/` — GPU Intrinsics" table has 12 rows. Only 7 name a module that exists; the other 5 were deleted: intrinsics/sync.rs deleted in 6a9a637 (NVIDIA#406) intrinsics/cluster.rs deleted in 6a9a637 (NVIDIA#406) intrinsics/tcgen05.rs deleted in 6a9a637 (NVIDIA#406) intrinsics/clc.rs deleted in 6a9a637 (NVIDIA#406) intrinsics/warp.rs deleted in 4c1d583 (NVIDIA#833) NVIDIA#406 moved those families onto the catalog path and NVIDIA#833 dropped the last of them, so all five are handled by `generated.rs` today. Meanwhile eight modules that do exist had no row: `asm`, `bigint`, `bitops`, `exact_div`, `float_math`, `iket`, `layout`, `saturating`. Between the two, the table describes a directory that has not existed for a long time -- and it is the one place a contributor looks to find where an intrinsic is translated. The book's `compiler/mir-importer.md` already describes the current model correctly ("`intrinsics/catalog.json` has its arm generated into ... `generated.rs`", and "the `intrinsics/` modules beside the generated file hold the cases the ..."), so this README was the last copy still on the old one. Rewritten to match, one row per file, each description taken verbatim from that module's own `//!` doc comment. The per-module "GPU" column is dropped for the reason NVIDIA#964 dropped its equivalent: minimum-SM is a per-intrinsic property the catalog already records and `intrinsics/generated-reference.md` already renders. Two smaller gaps on the same page: * The `translator/` table was missing `layout`, `location` and `payload_store`. * The Error Types table lists 7 of `PipelineError`'s 12 variants, missing `Optimization`, `TargetSelection`, `UnsupportedLinking`, `LibdeviceUnavailable` and `InvalidMirPassPipeline`. It also never says that `PipelineError` is defined in `cuda-oxide-codegen` and re-exported here, nor that the crate's own `TranslationErr` -- `Unsupported`, `TypeError`, `InvalidOp` -- is a different, narrower error. Both are now stated. (I first read this table against `error.rs` and thought every row was fictional; it is not. The variants are real, just defined a crate away.) Verified by script against the tree, with no ghost and no missing row in any of the three tables: the intrinsics table is now exactly the 15 files in `terminator/intrinsics/`; the translator table exactly the 9 files in `translator/` plus the `terminator` subdirectory it also lists; and the error table exactly the 12 `PipelineError` variants. Signed-off-by: Vyncint Ng <[email protected]>
Collaborator
|
3 of 4 tasks
nihalpasham
pushed a commit
that referenced
this pull request
Aug 19, 2026
…ranslator rows were missing (#996) Two follow-ups from the #978 merge note. **The TMA expansion.** You flagged that #978's `tma` row was copied verbatim from `tma.rs`, whose own doc comment says "Tensor Memory Access". The unit is the Tensor Memory *Accelerator*, and the tree already says so in 22 places -- including `cuda-device/src/tma.rs`, `dialect-nvvm/src/ops/generated/tma.rs`, and the book chapter of that name. mir-importer was the holdout, in four places, so fixing the source alone would have left the README I just landed disagreeing with it: src/translator/terminator/intrinsics/tma.rs:6 module doc src/translator/terminator/intrinsics/tma.rs:34 fn doc prose src/translator/terminator/intrinsics/mod.rs:18 table row README.md:105 table row All four now read "Accelerator", and `Tensor Memory Access` no longer appears anywhere under `crates/mir-importer/`. This is the cost of the verbatim-from-doc-comment rule #977 and #978 adopted: it cannot drift from the source, which also means it faithfully reproduces the source's mistakes. Worth the trade, but the fix has to land in the source. **The three translator rows.** `src/translator/mod.rs` carries the same module table as the README and was short the same three modules #978 added there: `layout`, `location` and `payload_store`. One thing I checked and will not claim: unlike #977's table, making these rows intra-doc links does **not** put them under the docs gate. `translator` is `pub(crate) mod` since 4c1d583 (#833, "stop exporting the translator"), so `cargo doc --no-deps` never documents it and an unresolved link there is not an error. Verified by adding a `[`ghost_module`]` row and watching the gate pass. It does fail under `--document-private-items` -- but that flag also surfaces three pre-existing unresolved links elsewhere in the crate (`MirFieldAddrOp`, `MirArrayElementAddrOp`, `MirArrayType`), so turning it on is its own piece of work, not a free win here. The rows are links because the seven around them are; the enforcement claim belongs only to #977's table. Verified: the translator table is now exactly the 9 files in `translator/` plus the `terminator` subdirectory; the README's `tma` row and `tma.rs`'s doc comment are byte-identical again; `cargo test -p mir-importer` and the docs gate are clean. Signed-off-by: Vyncint Ng <[email protected]>
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.
Summary
README.md's "terminator/intrinsics/— GPU Intrinsics" table has 12 rows. Only 7 name a module that exists:intrinsics/sync.rs6a9a6373(#406)intrinsics/cluster.rs6a9a6373(#406)intrinsics/tcgen05.rs6a9a6373(#406)intrinsics/clc.rs6a9a6373(#406)intrinsics/warp.rs4c1d5838(#833)#406 moved those families onto the catalog path and #833 dropped the last of them, so all five are handled by
generated.rstoday. Meanwhile eight modules that do exist had no row:asm,bigint,bitops,exact_div,float_math,iket,layout,saturating.Between the two, the table describes a directory that has not existed for a long time — and it is the one place a contributor looks to find where an intrinsic is translated.
The book's
compiler/mir-importer.mdalready describes the current model correctly ("intrinsics/catalog.jsonhas its arm generated into …generated.rs"), so this README was the last copy still on the old one. Rewritten to match: one row per file, each description verbatim from that module's own//!doc comment. The per-module "GPU" column is dropped for the reason #964 dropped its equivalent — minimum-SM is a per-intrinsic property the catalog already records.Two smaller gaps on the same page
translator/table was missinglayout,locationandpayload_store.PipelineError's 12 variants, missingOptimization,TargetSelection,UnsupportedLinking,LibdeviceUnavailableandInvalidMirPassPipeline. It also never says thatPipelineErroris defined incuda-oxide-codegenand re-exported here, nor that the crate's ownTranslationErr—Unsupported,TypeError,InvalidOp— is a different, narrower error. Both are now stated.Testing
Local, no GPU — documentation only.
terminator/intrinsics/; translator = exactly the 9 files intranslator/plus theterminatorsubdirectory it also lists; errors = exactly the 12PipelineErrorvariantscargo oxide run <example>— not applicable