Skip to content

docs(dialect-mir): the attributes table and source tree are the two halves #965 missed - #972

Merged
nihalpasham merged 1 commit into
NVIDIA:mainfrom
vyncint:docs/dialect-mir-attributes-and-tree
Aug 18, 2026
Merged

nihalpasham merged 1 commit into
NVIDIA:mainfrom
vyncint:docs/dialect-mir-attributes-and-tree

Conversation

@vyncint

@vyncint vyncint commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

#965 corrected this README's type and operation tables. It left the other two inventories on the same page, and both are stale in the same way — one of them now contradicting the tables #965 just fixed.

Attributes: "four" → seven

src/attributes.rs has seven #[pliron_attr(...)] declarations; the table lists four. The three missing ones are all recent, and two pair directly with ops the README already lists:

Attribute Rust type Pairs with
mir.fp16_attr MirFP16Attr MirFP16Type, already in the Types table
mir.unroll UnrollAttr mir.unroll_hint — added to the ops table by #965
mir.compiler_result_bundle CompilerResultBundleAttr the multi-result return ABI from #888

mir.unroll is the clearest case: #965 added mir.unroll_hint to the operations table, and the attribute that op exists to carry sat three rows below, undocumented.

Source Layout tree

It contradicts the page above it:

Tree entry Says Page says
types.rs # 7 MIR types the Types table lists nine
attributes.rs # 4 ... attributes see above — seven
ops/ no debug.rs the Operations table lists it
src/ — no const_fold.rs, rust_intrinsics.rs, side_effects.rs

So a reader who trusted the tree came away with different numbers than one who trusted the tables, on a single page. Three module comments were also narrower than their files (control_flow also carries unroll hints, memory also memcpy/memmove, aggregate also slices) — all ops #965 added to the table without the tree following.

Both inventories now state the rule that makes them checkable, as the operations table does: one row per #[pliron_attr(...)], one tree entry per file.

Testing

Local, no GPU.

  • The attributes table matches all seven (name, Rust type) pairs exactly by script — MirCastKindAttr is a pub enum, the rest pub struct
  • The Source Layout tree matches src/*.rs plus src/ops/*.rs exactly: 19 listed, 19 on disk, none missing and none invented
  • check-crate-inventory.sh passes
  • cargo oxide run <example> — not applicable, documentation only

…alves NVIDIA#965 missed

NVIDIA#965 corrected this README's type and operation tables. It left the other two
inventories on the same page, and both are stale in the same way -- one of them
now contradicting the tables NVIDIA#965 just fixed.

**Attributes: "four" -> seven.** `src/attributes.rs` has seven
`#[pliron_attr(...)]` declarations; the table lists four. The three missing
ones are all recent, and two pair directly with ops the README already lists:

  mir.fp16_attr               MirFP16Attr                `f16` constant values,
                                                         paired with MirFP16Type
  mir.unroll                  UnrollAttr                 the factor carried by
                                                         `mir.unroll_hint`
  mir.compiler_result_bundle  CompilerResultBundleAttr    the multi-result return
                                                         ABI marker from NVIDIA#888

`mir.unroll` is the clearest case: NVIDIA#965 added `mir.unroll_hint` to the
operations table, and the attribute that op exists to carry was three rows
below, undocumented.

**Source Layout tree.** It contradicts the page above it:

  types.rs        "# 7 MIR types"      -- the Types table now says nine
  attributes.rs   "# 4 ... attributes" -- see above
  ops/            no `debug.rs`        -- the Operations table now lists it
  src/            no `const_fold.rs`, `rust_intrinsics.rs`, `side_effects.rs`

So a reader who trusted the tree came away with different numbers than a reader
who trusted the tables, on one page. Three module comments were also narrower
than their files (`control_flow` also carries unroll hints, `memory` also
`memcpy`/`memmove`, `aggregate` also slices) -- all ops NVIDIA#965 added to the table
without the tree following.

Both inventories now state the rule that makes them checkable, as the
operations table does: one row per `#[pliron_attr(...)]`, one tree entry per
file.

Verified by script against the tree: the attributes table matches all seven
`(name, Rust type)` pairs exactly -- `MirCastKindAttr` is a `pub enum`, the
rest are `pub struct` -- and the Source Layout tree matches `src/*.rs` plus
`src/ops/*.rs` exactly, 19 files listed and 19 on disk, none missing and none
invented. check-crate-inventory passes.

Signed-off-by: Vyncint Ng <[email protected]>
@nihalpasham nihalpasham added documentation Improvements or additions to documentation codegen Device code-generation pipeline (Rust MIR to IR to PTX) labels Aug 18, 2026
@nihalpasham

Copy link
Copy Markdown
Collaborator
  • Recounted at d485edb: 7 #[pliron_attr], 9 #[pliron_type], 19 files across src/ - all exact.
  • Non-blocking: the last three attribute rows are out of declaration order.

@nihalpasham
nihalpasham merged commit 0c191e6 into NVIDIA:main Aug 18, 2026
43 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codegen Device code-generation pipeline (Rust MIR to IR to PTX) documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants