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

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:

Args:

  • โ€‹layout (LayoutType): The layout to divide.

Returns:

Layout[*?, *?]: A ZippedDivideLayout with inner and outer components.

Was this page helpful?