IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo module

tileops

Defines TileOps: tile-level operations built from layout.atoms.

A TileOp moves or computes a whole tile by issuing atoms. It derives the memory tile's placement, a BitLayout from logical coordinate bits to element offsets, and matches it against the atom's operand maps, converted from the operand's address encoding to the engine's element offsets: every index bit the atom fixes on the memory side must be played by one logical bit that reaches the same offset.

The logical bits played by the atom's lane and warp bits say which thread holds which elements. The remaining logical bits, in order, are this thread's register tile, whose placement must put the atom's value bits on the registers its register map names. Logical bits no index bit plays are issued over: the TileOp issues the atom once per value of them. Each issue passes the memory at those bits and this thread's warp; the instruction adds the lane and value parts, as tcgen05.ld does. An atom without lane or warp bits splits nothing, and every thread of the caller moves its own tile.

A TileOp never waits: only a building block does. load and store issue their atoms and return; the building block that called them waits with the atom's completion, such as TMemLoadWait.wait(), when it needs the registers or the memory, so that other work can run while the issues are in flight.

You can import these APIs from the layout.tileops package:

from layout.tileops import can_load, can_store, load, store

Functions​

  • ​can_load: Returns whether load can move a memory tile of layout LM in engine EM into register tiles of layout LR with atom A.
  • ​can_store: Returns whether store can move register tiles of layout LR into a memory tile of layout LM in engine EM with atom A.
  • ​load: Loads a memory tile into the issuing threads' register tiles with atom.
  • ​store: Stores the issuing threads' register tiles into a memory tile with atom.

Was this page helpful?