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 struct
EpilogueKContext
struct EpilogueKContext[origin: MutOrigin, input_origin: MutOrigin, opc: OutputPipelineConfig, num_input_stages: Int]
Per-K context manager for epilogue warp in blockwise FP8.
Bundles output pipeline (MMA→Epilogue sync) and input pipeline (A-scales) into a single context manager for clean per-K iteration handling.
Example usage: for k_iter in range(num_iters): with epi_ctx.per_k_stage(input_pipeline) as epi_stage: accum.promote(epi_stage, ...) # exit signals BOTH pipelines
enter: Waits for MMA to complete this K iteration, returns EpilogueKStage exit: Signals both output consumer barrier AND input consumer_step
Parameters
- origin (
MutOrigin): Origin of the output pipeline reference. - input_origin (
MutOrigin): Origin of the input pipeline reference. - opc (
OutputPipelineConfig): Output pipeline configuration (stages, stride, cta_group). - num_input_stages (
Int): Number of stages in the input (A-scales) pipeline.
Fields
- output_pipeline_ptr (
Pointer[OutputTilePipeline[opc], origin]): - input_pipeline_ptr (
Pointer[ProducerConsumerPipeline[num_input_stages], input_origin]): - output_stage (
EpilogueKContext[origin, input_origin, opc, num_input_stages].OutputStageType): - input_stage_index (
UInt32):
Implemented traits
AnyType,
Copyable,
Deinitable,
ImplicitlyCopyable,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime members
CombinedStageType
comptime CombinedStageType = EpilogueKStage[opc, num_input_stages]
cta_group
comptime cta_group = opc.cta_group
InputPipelineType
comptime InputPipelineType = ProducerConsumerPipeline[num_input_stages]
num_output_stages
comptime num_output_stages = opc.num_stages
OutputPipelineType
comptime OutputPipelineType = OutputTilePipeline[opc]
OutputStageType
comptime OutputStageType = OutputStage[opc]
Methods
__init__
def __init__(output_pipeline_ptr: Pointer[OutputTilePipeline[opc], origin], input_pipeline_ptr: Pointer[ProducerConsumerPipeline[num_input_stages], input_origin]) -> Self
__enter__
def __enter__(mut self) -> Self.CombinedStageType
Returns:
Self.CombinedStageType
__exit__
def __exit__(mut self)