Skip to main content

Mojo struct

MMATileCoords

@register_passable(trivial) struct MMATileCoords

Coordinates for an MMA tile in the output.

Fields

  • m_mma (Int):
  • n_mma (Int):
  • mma_id (Int):

Implemented traits

AnyType, Copyable, ImplicitlyCopyable, Movable, UnknownDestructibility

Aliases

__copyinit__is_trivial

alias __copyinit__is_trivial = True

__del__is_trivial

alias __del__is_trivial = True

__moveinit__is_trivial

alias __moveinit__is_trivial = True

Methods

__init__

__init__(m_mma: Int, n_mma: Int, mma_id: Int) -> Self

Initialize MMA tile coordinates.

Args:

  • m_mma (Int): MMA tile index in M dimension.
  • n_mma (Int): MMA tile index in N dimension.
  • mma_id (Int): Linearized MMA tile ID.

compute

static compute(m_mma: Int, n_mma: Int, num_m_mmas: Int) -> Self

Compute MMA tile coordinates from indices.

Args:

  • m_mma (Int): MMA tile index in M dimension.
  • n_mma (Int): MMA tile index in N dimension.
  • num_m_mmas (Int): Total number of MMA tiles in M dimension.

Returns:

Self: MMATileCoords with computed mma_id.

Was this page helpful?