For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
mma
def mma[kind: UMMAKind, //, cta_group: Int = Int(1), /, *, c_scale: UInt32 = UInt32(1)](a_desc: MMASmemDescriptor, b_desc: MMASmemDescriptor, c_tmem: UInt32, inst_desc: UMMAInsDescriptor[kind])
Perform a matrix multiply-accumulate operation using the tcgen05.mma instruction.
Parameters:
- βkind (
UMMAKind): Data type of the matrices. - βcta_group (
Int): Number of ctas used by MMA. - βc_scale (
UInt32): Scale factor for the C matrix, 0 or 1.
Args:
- βa_desc (
MMASmemDescriptor): The descriptor for the A matrix. - βb_desc (
MMASmemDescriptor): The descriptor for the B matrix. - βc_tmem (
UInt32): The address of the C matrix in the tensor memory. - βinst_desc (
UMMAInsDescriptor[kind]): The descriptor for the MMA instruction.
def mma[kind: UMMAKind, //, cta_group: Int = Int(1), /](a_desc: MMASmemDescriptor, b_desc: MMASmemDescriptor, c_tmem: UInt32, inst_desc: UMMAInsDescriptor[kind], sfa_tmem: UInt32, sfb_tmem: UInt32, c_scale: UInt32)
Perform a matrix multiply-accumulate operation using the tcgen05.mma instruction.
Parameters:
Args:
- βa_desc (
MMASmemDescriptor): The descriptor for the A matrix. - βb_desc (
MMASmemDescriptor): The descriptor for the B matrix. - βc_tmem (
UInt32): The address of the C matrix in the tensor memory. - βinst_desc (
UMMAInsDescriptor[kind]): The descriptor for the MMA instruction. - βsfa_tmem (
UInt32): The address of the block scale factor A in the tensor memory. - βsfb_tmem (
UInt32): The address of the block scale factor B in the tensor memory. - βc_scale (
UInt32): Scale factor for the C matrix, 0 or 1.
def mma[kind: UMMAKind, //, cta_group: Int = Int(1), /](a_desc: MMASmemDescriptor, b_desc: MMASmemDescriptor, c_tmem: UInt32, inst_desc: UMMAInsDescriptor[kind], c_scale: UInt32)
Perform a matrix multiply-accumulate operation using the tcgen05.mma instruction.
Parameters:
Args:
- βa_desc (
MMASmemDescriptor): The descriptor for the A matrix. - βb_desc (
MMASmemDescriptor): The descriptor for the B matrix. - βc_tmem (
UInt32): The address of the C matrix in the tensor memory. - βinst_desc (
UMMAInsDescriptor[kind]): The descriptor for the MMA instruction. - βc_scale (
UInt32): Scale factor for the C matrix. Any non-zero value is translated to1.
def mma[kind: UMMAKind, //, cta_group: Int = Int(1), /](a_desc: UInt32, b_desc: MMASmemDescriptor, c_tmem: UInt32, inst_desc: UMMAInsDescriptor[kind], c_scale: UInt32)
Perform a matrix multiply-accumulate operation using the tcgen05.mma instruction.
Parameters:
Args:
- βa_desc (
UInt32): The descriptor for the A matrix. - βb_desc (
MMASmemDescriptor): The descriptor for the B matrix. - βc_tmem (
UInt32): The address of the C matrix in the tensor memory. - βinst_desc (
UMMAInsDescriptor[kind]): The descriptor for the MMA instruction. - βc_scale (
UInt32): Scale factor for the C matrix. Any non-zero value is interpreted as1.
def mma[kind: UMMAKind, //, cta_group: Int = Int(1), /, *, c_scale: UInt32 = UInt32(1)](a_desc: UInt32, b_desc: MMASmemDescriptor, c_tmem: UInt32, inst_desc: UMMAInsDescriptor[kind])
Perform a matrix multiply-accumulate operation using the tcgen05.mma instruction.
Parameters:
- βkind (
UMMAKind): Data type of the matrices. - βcta_group (
Int): Number of ctas used by MMA. - βc_scale (
UInt32): Scale factor for the C matrix, 0 or 1.
Args:
- βa_desc (
UInt32): The descriptor for the A matrix. - βb_desc (
MMASmemDescriptor): The descriptor for the B matrix. - βc_tmem (
UInt32): The address of the C matrix in the tensor memory. - βinst_desc (
UMMAInsDescriptor[kind]): The descriptor for the MMA instruction.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!