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

zipped_divide

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.