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 trait
MmaAtom
Describes a matrix multiply-accumulate instruction, C += A @ B.
The accumulator is read and written in place, as UMMA and WGMMA do; an
instruction with a separate C operand passes the same storage for both.
An index multiplies the A element a_map reaches by the B element
b_map reaches and adds the product into the accumulator c_map
reaches.
Implemented traits
AnyType,
Atom,
Copyable,
Deinitable,
ImplicitlyCopyable,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime members
a_dtype
comptime a_dtype
The element type of the A operand.
a_map
comptime a_map
Where each index reads A.
AEngine
comptime AEngine
The engine of the storage A lives in.
b_dtype
comptime b_dtype
The element type of the B operand.
b_map
comptime b_map
Where each index reads B.
BEngine
comptime BEngine
The engine of the storage B lives in.
c_dtype
comptime c_dtype
The element type of the accumulator.
c_map
comptime c_map
Where each index updates the accumulator.
CEngine
comptime CEngine
The engine of the storage the accumulator lives in.
Required methods
__call__
def __call__[TC: DType, LC: TensorLayout, EC: TensorEngine, TA: DType, LA: TensorLayout, EA: TensorEngine, TB: DType, LB: TensorLayout, EB: TensorEngine](self, c: MutTileTensor[TC, LC, Engine=EC, address_space=c.address_space, linear_idx_type=c.linear_idx_type], a: ImmTileTensor[TA, LA, Engine=EA, address_space=a.address_space, linear_idx_type=a.linear_idx_type], b: ImmTileTensor[TB, LB, Engine=EB, address_space=b.address_space, linear_idx_type=b.linear_idx_type]) -> Self.Completion.Result
Issues the instruction once.
Parameters:
- TC (
DType): The accumulator's element type. - LC (
TensorLayout): The accumulator view's layout. - EC (
TensorEngine): The accumulator view's engine. - TA (
DType): A's element type. - LA (
TensorLayout): A's view layout. - EA (
TensorEngine): A's view engine. - TB (
DType): B's element type. - LB (
TensorLayout): B's view layout. - EB (
TensorEngine): B's view engine.
Args:
- c (
MutTileTensor[TC, LC, Engine=EC, address_space=c.address_space, linear_idx_type=c.linear_idx_type]): The operandc_mapdescribes. - a (
ImmTileTensor[TA, LA, Engine=EA, address_space=a.address_space, linear_idx_type=a.linear_idx_type]): The operanda_mapdescribes. - b (
ImmTileTensor[TB, LB, Engine=EB, address_space=b.address_space, linear_idx_type=b.linear_idx_type]): The operandb_mapdescribes.
Returns:
_Self.Completion.Result: The instruction's handle for a HandleCompletion, else
nothing.