Skip to main content

Module launch

Module launch 

Source
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§

AccumulateArg
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.
AccumulateArgLaunch
Arg
One operand of a launch, being described; S says whether its axes are stated yet.
Bound
A bound operand: its tensor argument and the element its buffer holds, comptime TileSpec and served width.
Buffered
The default Destination: an Output buffer.
Labelled
Typestate marker: the operand’s axes are stated.
LastArrival
One output box of a Levels::shared_by share, 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::across split 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 the TileArg the relay was opened on; the turns are passed on through turns, 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 Destination the 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_spec settles 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§

BoundaryPolicy
How an operand’s reads are bounds-checked, where the caller states it. An operand that states none is checked with Boundary::Zero on 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).
OutputArgs
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.
VectorRequirement
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.
DestinationLaunch
Destination’s host half: how what the launch built becomes the argument.
SinkLaunch
A kernel prepared to store through a Destination the caller builds afterwards, at width: the caller binds the output only once it knows the kernel’s spec.
SinkLaunchVisitor
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.

Functions§

spawnable
Whether a device of hardware spawns cube_count cubes of cube_dim units, or the Refusal saying why not.