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

elementwise_epilogue_c_tile

def elementwise_epilogue_c_tile[EpilogueFnType: ElementwiseEpilogueFn, ComputeFnType: ElementwiseComputeFn, //, simd_width: Int, c_type: DType, *, has_compute_fn: Bool](offset: GemmShape, tile_len: GemmShape, c: TileTensor[c_type, Engine=c.Engine, linear_idx_type=c.linear_idx_type], epilogue_fn: EpilogueFnType, compute_fn: ComputeFnType)

Applies a vectorized epilogue function over a 2D C output tile.

Iterates column chunks of tile_len.N using SIMD width simd_width. With has_compute_fn, stores compute_fn of each loaded chunk back into c; otherwise hands the global (m, n) coordinates and the loaded values to epilogue_fn.

Parameters:

  • ​EpilogueFnType (ElementwiseEpilogueFn): Type of epilogue_fn (inferred).
  • ​ComputeFnType (ElementwiseComputeFn): Type of compute_fn (inferred).
  • ​simd_width (Int): SIMD vector width for epilogue loads.
  • ​c_type (DType): Data type of the C matrix.
  • ​has_compute_fn (Bool): Whether to apply compute_fn instead of epilogue_fn.

Args:

Was this page helpful?