IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Mojo function

swiglu_extra_fixed_smem

def swiglu_extra_fixed_smem[c_type: DType](mma_shape: IndexList[Int(3)], cta_group: Int, AB_swapped: Bool = False) -> Int

Compute extra fixed SMEM bytes for the SwiGLU SMEM-path half tiles.

Returns the bytes needed for double-buffered half-output SMEM tiles. The tile shape is (output_tile_shape[0], output_tile_shape[1] / 2) in both AB_swapped orientations (dims are transposed but byte count is symmetric), so the same formula applies for both.

Parameters:

  • ​c_type (DType): DType of the C output elements.

Args:

  • ​mma_shape (IndexList[Int(3)]): MMA instruction shape as (MMA_M, MMA_N, MMA_K), used to derive the output tile shape.
  • ​cta_group (Int): Number of cooperating CTAs per cluster group (1 or 2).
  • ​AB_swapped (Bool): Whether the A and B operands are swapped (defaults to False).

Returns:

Int

Was this page helpful?