Repository navigation
docs(mir-importer): TMA is the Tensor Memory Accelerator, and three translator rows were missing - #996
Merged
nihalpasham merged 1 commit intoAug 19, 2026
Conversation
…ranslator rows were missing Two follow-ups from the NVIDIA#978 merge note. **The TMA expansion.** You flagged that NVIDIA#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 NVIDIA#977 and NVIDIA#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 NVIDIA#978 added there: `layout`, `location` and `payload_store`. One thing I checked and will not claim: unlike NVIDIA#977's table, making these rows intra-doc links does **not** put them under the docs gate. `translator` is `pub(crate) mod` since 4c1d583 (NVIDIA#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 NVIDIA#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]>
Collaborator
|
nihalpasham
approved these changes
Aug 19, 2026
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
Two follow-ups from the #978 merge note.
The TMA expansion
You flagged that #978's
tmarow was copied verbatim fromtma.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 — includingcuda-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:All four now read "Accelerator", and
Tensor Memory Accessno longer appears anywhere undercrates/mir-importer/. Fixing the source alone would have left the README I just landed disagreeing with it, so both move together.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.rscarries the same module table as the README and was short the same three modules #978 added there:layout,location,payload_store.One claim I checked and am not making
Unlike #977's table, making these rows intra-doc links does not put them under the docs gate.
translatorispub(crate) modsince4c1d5838(#833, "stop exporting the translator"), socargo doc --no-depsnever 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.Testing
Local, no GPU.
translator/plus theterminatorsubdirectory it also liststmarow andtma.rs's doc comment are byte-identical againcargo test -p mir-importer(1090 tests) and the docs gate cleancargo oxide run <example>— not applicable