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 package

layout

Provides layout and layout tensor types, which abstract memory layout for multidimensional data.

  • The Layout type represents a mapping between a set of logical coordinates and a linear index. It can be used, for example, to map logical tensor coordinates to a memory address, or to map GPU threads to tiles of data.

  • The LayoutTensor type is a high-performance tensor with explicit memory layout via a Layout.

Modules​

  • ​coord: Subpackage exposing std.utils.coord as layout.coord for kernel imports.
  • ​copy: Provides copy policy traits and utilities for layout memory operations.
  • ​element: Provides element-based access to memory using layout-driven vectorization.
  • ​int_tuple: Hierarchical integer tuple data structures for high-performance tensor operations.
  • ​layout: Provides a high-performance tensor layout system for memory mapping and indexing.
  • ​layout_tensor: Provides the LayoutTensor type for representing multidimensional data.
  • ​math: Implements math methods that work on layout tensors.
  • ​runtime_layout: Provides the RuntimeLayout type and functions for working with it. You can use RuntimeLayout to define a layout where the dimensions are not known at compile time.
  • ​runtime_tuple: Provides the RuntimeTuple data structure and related utility functions for handling tuple-like data with both compile-time and runtime elements. RuntimeTuple is designed for high-performance tensor operations, supporting efficient manipulation of multi-dimensional data structures like shapes, indices, and coordinates.
  • ​swizzle: Defines swizzle layouts for optimizing memory access patterns.
  • ​tensor_core: Tensor Core Module for High-Performance Matrix Operations.
  • ​tensor_core_async: Tensor Core Async Module.
  • ​tensor_storage: Defines storage abstractions for tile-backed tensor views.
  • ​tile_io: Trait and utilities for copying data between TileTensors.
  • ​tile_layout: Provides a mixed compile-time/runtime layout system for tensor memory mapping.
  • ​tile_tensor: TileTensor type for structured memory access with compile-time layout information.
  • ​tma_async: Tensor Memory Accelerator (TMA) Asynchronous Operations Module.

Was this page helpful?