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 struct

BlockwiseFP8TileStorage

struct BlockwiseFP8TileStorage[a_type: DType, b_type: DType, c_type: DType, a_scales_type: DType, a_shape: Tuple[Int, Int], b_shape: Tuple[Int, Int], c_dim0: Int, c_dim1: Int, a_scales_shape: Tuple[Int, Int], num_pipeline_stages: Int, num_output_stages: Int]

Storage for blockwise FP8 matmul tiles (A, B, C, A-scales).

Single source of truth for blockwise FP8 tile arrays and storage. B-scales are read directly from global memory during epilogue.

All tiles use TileTensor natively, including in SMemEpilogueWriter.

IMPORTANT: Field order preserves SMEM layout compatibility: a, b, c, a_scales.

Parameters​

  • ​a_type (DType): Data type for A matrix tiles.
  • ​b_type (DType): Data type for B matrix tiles.
  • ​c_type (DType): Data type for C matrix tiles.
  • ​a_scales_type (DType): Data type for A scale tiles.
  • ​a_shape (Tuple[Int, Int]): Tile shape for A tiles as (rows, cols).
  • ​b_shape (Tuple[Int, Int]): Tile shape for B tiles as (rows, cols).
  • ​c_dim0 (Int): First dimension for C tiles (OutputM).
  • ​c_dim1 (Int): Second dimension for C tiles (OutputN).
  • ​a_scales_shape (Tuple[Int, Int]): Tile shape for A scale tiles as (rows, cols).
  • ​num_pipeline_stages (Int): Number of input pipeline stages.
  • ​num_output_stages (Int): Number of output pipeline stages.

Fields​

  • ​a_tiles_storage (BlockwiseFP8TileStorage[a_type, b_type, c_type, a_scales_type, a_shape, b_shape, c_dim0, c_dim1, a_scales_shape, num_pipeline_stages, num_output_stages].ATileArray.Storage):
  • ​b_tiles_storage (BlockwiseFP8TileStorage[a_type, b_type, c_type, a_scales_type, a_shape, b_shape, c_dim0, c_dim1, a_scales_shape, num_pipeline_stages, num_output_stages].BTileArray.Storage):
  • ​c_tiles_storage (BlockwiseFP8TileStorage[a_type, b_type, c_type, a_scales_type, a_shape, b_shape, c_dim0, c_dim1, a_scales_shape, num_pipeline_stages, num_output_stages].CTileArray.Storage):
  • ​a_scales_tiles_storage (BlockwiseFP8TileStorage[a_type, b_type, c_type, a_scales_type, a_shape, b_shape, c_dim0, c_dim1, a_scales_shape, num_pipeline_stages, num_output_stages].AScalesTileArray.Storage):

Implemented traits​

AnyType, Deinitable, Movable

comptime members​

AScalesTileArray​

comptime AScalesTileArray = SMemTileArray2DRowMajor[a_scales_type, (load_from_mem a_scales_shape.__getitem_param__[Int(0)]()), (load_from_mem a_scales_shape.__getitem_param__[Int(1)]()), num_pipeline_stages]

ATileArray​

comptime ATileArray = SMemTileArray2D[a_type, (load_from_mem a_shape.__getitem_param__[Int(0)]()), (load_from_mem a_shape.__getitem_param__[Int(1)]()), num_pipeline_stages]

BTileArray​

comptime BTileArray = SMemTileArray2D[b_type, (load_from_mem b_shape.__getitem_param__[Int(0)]()), (load_from_mem b_shape.__getitem_param__[Int(1)]()), num_pipeline_stages]

CTileArray​

comptime CTileArray = SMemTileArray2DRowMajor[c_type, c_dim0, c_dim1, num_output_stages]

Methods​

a_tiles​

def a_tiles(ref[AddressSpace._value] self) -> Self.ATileArray

Get A tile array accessor.

Returns:

Self.ATileArray

b_tiles​

def b_tiles(ref[AddressSpace._value] self) -> Self.BTileArray

Get B tile array accessor.

Returns:

Self.BTileArray

c_tiles​

def c_tiles(ref[AddressSpace._value] self) -> Self.CTileArray

Get C tile array accessor.

Returns:

Self.CTileArray

a_scales_tiles​

def a_scales_tiles(ref[AddressSpace._value] self) -> Self.AScalesTileArray

Get A-scales tile array accessor.

Returns:

Self.AScalesTileArray

Was this page helpful?