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
def bulk_mma[kind: UMMAKind, //, layout_a: Layout, layout_b: Layout, *, num_k_mmas: Int, mma_k: Int, operand_size: Int, cta_group: Int = Int(1)](idesc: UMMAInsDescriptor[kind], a: MMASmemDescriptorPair, b: MMASmemDescriptorPair, c_tmem: UInt32, c_scale: UInt32, elect: Int32)
Issues a full-tile SS (both operands in SMEM) non-warp-specialized tcgen05.mma contraction.
Parameters:
- βkind (
UMMAKind):UMMAKindselecting thetcgen05.mmainstruction variant. - βlayout_a (
Layout): SMEM layout of the A operand tile, used to compute per-K-block A descriptor offsets. - βlayout_b (
Layout): SMEM layout of the B operand tile, used to compute per-K-block B descriptor offsets. - βnum_k_mmas (
Int): Number ofmma_k-sized K-dimension blocks to contract over. - βmma_k (
Int): K-dimension tile size per MMA block, in elements. - βoperand_size (
Int): Size in bytes of the A and B operand elements. - βcta_group (
Int): Number of cooperating CTAs, 1 or 2 (defaults to 1).
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.
def bulk_mma[kind: UMMAKind, //, layout_b: Layout, *, mma_k: Int, num_k_mmas: Int, operand_size: Int, cta_group: Int = Int(1)](idesc: UMMAInsDescriptor[kind], a: UInt32, b: MMASmemDescriptorPair, c_tmem: UInt32, c_scale: UInt32, elect: Int32)
Issues a full-tile TS (A in TMEM, B in SMEM) non-warp-specialized tcgen05.mma contraction.
Parameters:
- βkind (
UMMAKind):UMMAKindselecting thetcgen05.mmainstruction variant. - βlayout_b (
Layout): SMEM layout of the B operand tile, used to compute per-K-block B descriptor offsets. - βmma_k (
Int): K-dimension tile size per MMA block, in elements. - β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. - βcta_group (
Int): Number of cooperating CTAs, 1 or 2 (defaults to 1).
Args:
- βidesc (
UMMAInsDescriptor[kind]): UMMA instruction descriptor encoding the accumulator and operand dtypes and the output tile shape. - βa (
UInt32): TMEM base address of 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!