Skip to main content

Mojo module

utils

Shared helpers for gfx950 attention kernels.

Warp + fragment layout types are constructed inline in the structs that need them (Softmax, MaskTileOp), using TileLayout / Coord Layout Algebra. Selecting concrete Layout specializations across an Int struct parameter at the struct field level (rather than a ternary between two different Layout[...] specializations) avoids the Mojo conditional-type unification failure — see feedback_mojo_conditional_field_type.

Functions

  • get_warp_coords: Return (warp_row, warp_col) for the current warp given a BN×WN grid.

Was this page helpful?