IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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

store_p_quadrant

def store_p_quadrant[cols: Int, p_type: DType, //, *, BN: Int, p_tile_rows: Int](p_smem: Pointer[Scalar[p_type], address_space=AddressSpace.SHARED], p: Array[Float32, cols], row: UInt32, warp_in_wg: UInt32)

Row-local P quadrant writer (Layout-G register map -> SWIZZLE_NONE SMEM).

Lane identity = row (< 32); warp w holds columns [w*BN/4, (w+1)*BN/4). Casts the fp32 quadrant to p_type and stores it in the k-major layout the SS P@V A-descriptor reads: element (r, k) sits in block k // sw_K at block base (k // sw_K) * p_tile_rows * sw_K, at within-block offset r * sw_K. 16 B stores; the caller owns the fence_async_view_proxy + barrier before the MMA reads P.

Parameters:

  • ​cols (Int): Quadrant width in elements; must equal BN // 4 (inferred).
  • ​p_type (DType): Element dtype of the P SMEM tile (inferred).
  • ​BN (Int): Key-block width of the full P tile.
  • ​p_tile_rows (Int): Physical row count of the P SMEM tile.

Args:

Was this page helpful?