Skip to main content
Log in

Mojo function

calculate_tile_n_k

calculate_tile_n_k[a_type: DType, b_type: DType, c_type: DType, kernel_cols: Int](n: Int, k: Int) -> Index[2]

Helper heuristic function to decide on tile size to partition the matmul given the cache size and desired data layout.

Parameters:

  • a_type (DType): The type of the A tensor.
  • b_type (DType): The type of the B tensor.
  • c_type (DType): The type of the C tensor.
  • kernel_cols (Int): The umber of columns of the micro kernel.

Returns:

The calculated tile size to partition the matmul as (TileN, TileK).

calculate_tile_n_k[a_type: DType, b_type: DType, c_type: DType, kernel_cols: Int](global_tile_shape: GemmShape) -> Index[2]

Was this page helpful?