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 toFalse).
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!