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 function
tmem_cell
def tmem_cell(view: TileTensor[Engine=TMemEngine, address_space=view.address_space, linear_idx_type=view.linear_idx_type], coord: Coord) -> Tuple[Int, Int]
Returns the lane and column this thread's element at coord of a TMEM view occupies.
The view's layout gives the cell relative to its base; the hardware adds
this thread's placement, which depends on the access shape the layout
selects: lane t for a (1, N) row of a warp tile, and lane t // 4,
column 2 * (t % 4) for a tmem_16x256b view. This is the one place
that placement is written down.
Args:
- view (
TileTensor[Engine=TMemEngine, address_space=view.address_space, linear_idx_type=view.linear_idx_type]): A row view or fragment view with a warp-base storage. - coord (
Coord): A coordinate of the view.
Returns:
Tuple[Int, Int]: The (lane, column) pair on the TMEM grid.