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

mhc_post_tile

def mhc_post_tile[dtype: DType, OutLayoutType: TensorLayout, StreamsLayoutType: TensorLayout, YLayoutType: TensorLayout, //, hc_mult: Int, width: Int, non_temporal: Bool = False](output: TileTensor[dtype, OutLayoutType, MutAnyOrigin], streams: TileTensor[dtype, StreamsLayoutType, ImmutAnyOrigin], y: TileTensor[dtype, YLayoutType, ImmutAnyOrigin], post: SIMD[.float32, hc_mult], comb: SIMD[.float32, (hc_mult * hc_mult)], row: Int, col: Int)

Writes one width-wide slice of one token's mHC streams back.

Covers columns [col, col + width). Every load is issued before the first FMA, so all hc_mult + 1 vectors are in flight together. Math is fp32, rounded to dtype once.

Parameters:

  • ​dtype (DType): Element type of the streams, y and the output.
  • ​OutLayoutType (TensorLayout): Layout of output.
  • ​StreamsLayoutType (TensorLayout): Layout of streams.
  • ​YLayoutType (TensorLayout): Layout of y.
  • ​hc_mult (Int): Number of parallel residual streams.
  • ​width (Int): Elements per vector access.
  • ​non_temporal (Bool): Whether to mark the loads and stores non-temporal.

Args:

Was this page helpful?