Skip to main content

Mojo function

tiled_matmul_run

tiled_matmul_run[config: KernelConfig[config.packed_shape], transpose_b: Bool, b_packed: Bool, simd_size: Int, elementwise_epilogue_enabled: Bool, kernel_id: InnerKernelID, algorithm: InnerMatmulKernel](alg: algorithm, c: TileTensor[c.dtype, c.LayoutType, c.origin, linear_idx_type=c.linear_idx_type, element_size=c.element_size], a: TileTensor[a.dtype, a.LayoutType, a.origin, linear_idx_type=a.linear_idx_type, element_size=a.element_size], b: TileTensor[b.dtype, b.LayoutType, b.origin, linear_idx_type=b.linear_idx_type, element_size=b.element_size], elementwise_epilogue_fn: def, global_tile_shape: GemmShape, global_tile_offset: GemmShape)

Interface function to run tiled matmul on a given sub-tile.

Args:

  • alg (algorithm): InnerMatmulKernel algorithm for microkernel.
  • c (TileTensor): Pre-allocated buffer space for result.
  • a (TileTensor): Operand A of the matmul.
  • b (TileTensor): Operand B of the mamtul.
  • elementwise_epilogue_fn (def): The elementwise epilogue function.
  • global_tile_shape (GemmShape): Tile shape this call will process.
  • global_tile_offset (GemmShape): Tile offset on the original buffer.

Was this page helpful?