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

make_layout

def make_layout[l1: Layout, l2: Layout, /, *, linear_idx_type: DType = DType.uint64](a: RuntimeLayout[l1, element_type=a.element_type, linear_idx_type=a.linear_idx_type], b: RuntimeLayout[l2, element_type=b.element_type, linear_idx_type=b.linear_idx_type]) -> RuntimeLayout[make_layout(l1, l2), element_type=b.element_type, linear_idx_type=linear_idx_type]

Combine two runtime layouts into a single composite layout.

This creates a new layout by concatenating the dimensions and strides of the input layouts.

Parameters:

  • ​l1 (Layout): The static layout type of a.
  • ​l2 (Layout): The static layout type of b.
  • ​linear_idx_type (DType): The integer type of the all index calculated by the returned runtime layout.

Args:

Returns:

RuntimeLayout[make_layout(l1, l2), element_type=b.element_type, linear_idx_type=linear_idx_type]: A new RuntimeLayout with dimensions from both input layouts.

Was this page helpful?