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 ofepilogue_fn(inferred). - ComputeFnType (
ElementwiseComputeFn): Type ofcompute_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 applycompute_fninstead ofepilogue_fn.
Args:
- offset (
GemmShape): Starting (M, N, K) offset within the global matmul space. - tile_len (
GemmShape): Number of rows and columns to process. - c (
TileTensor[c_type, Engine=c.Engine, linear_idx_type=c.linear_idx_type]): The C output tile. - epilogue_fn (
EpilogueFnType): Epilogue called with coordinates and a SIMD value chunk. - compute_fn (
ComputeFnType): Compute epilogue whose result is stored intoc.