MMA/Copy Atom

Index

MoYe.make_tiled_mmaFunction
make_tiled_mma(mma_op, atom_layout, permutations)

Create a TiledMMA object from an MMA operation, atom layout, and permutations. See also print_typst.

Arguments

  • mma_op::OP: The MMA operation.
  • atom_layout::Layout: The layout of the atom.
  • permutations::Tile: The permutations of the atom.

Examples

julia> tiled_mma = make_tiled_mma(MMAOP_8x8x4_F32F16F16F32_NT(), @Layout((2,2), (2,1)), (@Layout((4,4,2), (1,8,4)), _32, _4))
TiledMMA
  ThrLayoutVMNK: ((_4, _2), _2, _2, _1):((_1, _16), _8, _4, _0)
  PermutationMNK: ((_4, _4, _2):(_1, _8, _4), _32, _4)
MMAAtom
  Thread ID: (_4, _2):(_1, _16)
  Layout_A_TV: ((_4, _2), _4):((_8, _4), _1)
  Layout_B_TV: ((_4, _2), _4):((_8, _4), _1)
  Layout_C_TV: ((_2, _2, _2), (_2, _2, _2)):((_1, _16, _4), (_8, _2, _32))
source
MoYe.make_tiled_copyFunction
make_tiled_copy(copy_atom::CopyAtom,
                thr_layout::Layout,
                val_layout::Layout)

Make a tiled copy atom from a copy atom.

source
MoYe.print_typstFunction
print_typst(::AbstractMMAAtom)

Print the layout of the A, B, and C matrices in a typst format. Go to https://typst.app and paste the output to visualize the layout.

Example

julia> tiled_mma = make_tiled_mma(MMAOP_8x8x4_F32F16F16F32_NT(), @Layout((2,2), (2,1)), (@Layout((4,4,2), (1,8,4)), _32, _4))
TiledMMA
  ThrLayoutVMNK: ((_4, _2), _2, _2, _1):((_1, _16), _8, _4, _0)
  PermutationMNK: ((_4, _4, _2):(_1, _8, _4), _32, _4)
MMAAtom
  Thread ID: (_4, _2):(_1, _16)
  Layout_A_TV: ((_4, _2), _4):((_8, _4), _1)
  Layout_B_TV: ((_4, _2), _4):((_8, _4), _1)
  Layout_C_TV: ((_2, _2, _2), (_2, _2, _2)):((_1, _16, _4), (_8, _2, _32))


julia> print_typst(tiled_mma)

It will print the following image:

source
print_typst(::AbstractCopyAtom)

Print the layout of the source and destination matrices in a typst format.

Example

julia> tiled_copy = make_tiled_copy(CopyAtom{UniversalCopy{UInt128}, Float32}(), 
                                    @Layout((32,8)), 
                                    @Layout((4,1)))

julia> print_typst(tiled_copy)
source