Skip to main content
Version: Nightly

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:

  • LayoutType (TensorLayout): The type of the input layout.
  • tile (Coord): The tile shape to divide by.

Args:

  • layout (LayoutType): The layout to divide.

Returns:

Layout: A ZippedDivideLayout with inner and outer components.