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 function

tmem_cell

def tmem_cell(view: TileTensor[Engine=TMemEngine, address_space=view.address_space, linear_idx_type=view.linear_idx_type], coord: Coord[*coord.element_types]) -> 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:

Returns:

Tuple[Int, Int]: The (lane, column) pair on the TMEM grid.

Was this page helpful?