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
bulk_mma_ws
def bulk_mma_ws[kind: UMMAKind, a_dtype: DType, b_dtype: DType, *, a_BMN: Int, a_BK: Int, a_swizzle: TensorMapSwizzle, a_is_k_major: Bool, b_BMN: Int, b_BK: Int, b_swizzle: TensorMapSwizzle, b_is_k_major: Bool, num_k_mmas: Int, operand_size: Int, tcgen05_mma_type: String, mma_k: Int = Int(16), b_page_dense: Bool = False, k_start: Int = Int(0)](idesc: UMMAInsDescriptor[kind], a: MMASmemDescriptorPair, b: MMASmemDescriptorPair, c_tmem: UInt32, c_scale: UInt32, elect: Int32)
Issues a full-tile SS (both operands in SMEM) warp-specialized tcgen05.mma.ws contraction.
Parameters:
- βkind (
UMMAKind):UMMAKindselecting thetcgen05.mma.wsinstruction variant. - βa_dtype (
DType): Element dtype of the A operand, used to derive the A SMEM tile layout. - βb_dtype (
DType): Element dtype of the B operand, used to derive the B SMEM tile layout. - βa_BMN (
Int): M (or N) dimension of the A operand tile in elements, used to derive the A layout. - βa_BK (
Int): K dimension of the A operand tile in elements, used to derive the A layout. - βa_swizzle (
TensorMapSwizzle): SMEM swizzle mode for the A tile. - βa_is_k_major (
Bool): Whether A is stored k-major (True) or mn-major (False). - βb_BMN (
Int): M (or N) dimension of the B operand tile in elements, used to derive the B layout. - βb_BK (
Int): K dimension of the B operand tile in elements, used to derive the B layout. - βb_swizzle (
TensorMapSwizzle): SMEM swizzle mode for the B tile. - βb_is_k_major (
Bool): Whether B is stored k-major (True) or mn-major (False). - βnum_k_mmas (
Int): Number ofmma_k-sized K-dimension blocks to contract over. - βoperand_size (
Int): Size in bytes of the A and B operand elements. - βtcgen05_mma_type (
String):tcgen05.mma.wsinstruction string prefix, including the CTA-group selector. - βmma_k (
Int): K-dimension tile size per MMA block, in elements (defaults to 16). - βb_page_dense (
Bool): Whether B uses the row-major page-fold layout (defaults toFalse). - βk_start (
Int): Absolute K-block index of the first block in this tile (defaults to 0).
Args:
- βidesc (
UMMAInsDescriptor[kind]): UMMA instruction descriptor encoding the accumulator and operand dtypes and the output tile shape. - βa (
MMASmemDescriptorPair): SMEM descriptor pair for the A operand. - βb (
MMASmemDescriptorPair): SMEM descriptor pair for the B operand. - βc_tmem (
UInt32): TMEM base address of the output accumulatorC. - βc_scale (
UInt32): Accumulator init/accumulate scale; nonzero on the first block to initialize the accumulator, zero to accumulate. - βelect (
Int32):elect()result selecting the single thread that issues the MMA.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!