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
zipped_divide
def zipped_divide[LayoutType: TensorLayout, //, tile: Coord[tile.element_types]](layout: LayoutType) -> Layout[*?, *?]
Divides a layout into inner (tile) and outer (number-of-tiles) parts.
Given a layout and a tile shape, produces a hierarchical layout where the inner component has the tile shape with the original strides, and the outer component has shape = original_shape / tile with scaled strides.
Parameters:
- โLayoutType (
TensorLayout): The type of the input layout. - โtile (
Coord[tile.element_types]): The tile shape to divide by.
Args:
- โlayout (
LayoutType): The layout to divide.
Returns:
Layout[*?, *?]: A ZippedDivideLayout with inner and outer components.