Expand description
Binding tensors to a kernel and launching it: the Launcher, each operand’s
comptime spec, the binding that builds it from a tensor, the args the kernel receives, and
the Vectorization that settles each operand’s width.
Structs§
- Accumulate
Arg - An output several instances accumulate into, as a single launch argument, in lines of
width. The buffer must arrive holding zero: the atomic only ever adds. - Accumulate
ArgLaunch - Arg
- One operand of a launch, being described;
Ssays whether its axes are stated yet. - Bound
- A bound operand: its tensor argument and the element its buffer holds, comptime
TileSpecand served width. - Buffered
- The default
Destination: anOutputbuffer. - Labelled
- Typestate marker: the operand’s axes are stated.
- Last
Arrival - One output box of a
Levels::shared_byshare, held whole by one run or in parts by several (Portion::holders). A run holding it whole hands its sum straight on to the output. Each run holding a part parks it in a slot of its own and counts itself in at the box; the last to count adds the box’s slots in the order of their runs and hands the total on to the output. - Relay
- One output box, relayed by the cubes a
Levels::acrosssplit hands it: each contracts its own run, then takes its turn at the box’s carry in the order of the runs. The first turn writes its partial, each after adds its own into what is there a line at a time, and the last hands the sum on to the output. The carry is theTileArgthe relay was opened on; the turns are passed on throughturns, one counter a cube (Partitioning::relay_counters). - TmaBox
- The box a TMA descriptor moves: logical
(rows, cols), optional batch, and whether the descriptor is transposed (column-major). - TmaOperand
- What the TMA family launches from: the tensor map, the axes it spans, and its box.
- TmaStored
- A
Destinationthe TMA engine stores: the output is a tensor map, served as a tile a shared-memory box is bulk-stored into (Tile::smem_box,Tile::copy_from), a box at a time, which the descriptor clips at the tensor’s edge. Its width is the descriptor’s cell, so a launch binds it one element wide. - Unbound
- What
build_specsettles for an operand with no tensor to bind. - Unlabelled
- Typestate marker: the operand’s axes are not yet stated.
- Vectorization
- The requirements every component of a launch enqueued, and the widths they settle.
Enums§
- Boundary
Policy - How an operand’s reads are bounds-checked, where the caller states it. An operand that states
none is checked with
Boundary::Zeroon the axes that can leave the buffer. - Delivery
- Who moves an operand into a stage, and whether its bytes have landed when the fill returns.
- Grid
- How many cubes of how many units the launch runs: stated, or read off the levels.
- Output
- The operand a kernel leaves by: a tensor read and replaced (
TileArg), or an atomic tensor added into and never read (AccumulateArg). - Output
Args - Refusal
- Why a launch cannot run as described, or an operand cannot be bound to it.
- TmaLanding
- Where a box of a storage-tiled operand lands its values: the order the descriptor states the operand in.
- Vector
Requirement - Why an operand’s width must be narrower than the device reads it at.
Traits§
- Destination
- Which launch argument carries a kernel’s output and how the kernel serves it as a
Tile. - Destination
Launch Destination’s host half: how what the launch built becomes the argument.- Sink
Launch - A kernel prepared to store through a
Destinationthe caller builds afterwards, atwidth: the caller binds the output only once it knows the kernel’s spec. - Sink
Launch Visitor - What a kernel named by a value rather than a type is handed to, once prepared for a sink: each
value prepares a launch of its own type, so what receives it takes any
SinkLaunch.