Skip to main content

Mojo struct

AdvanceAfterWorkContext

@register_passable(trivial) struct AdvanceAfterWorkContext[work_origin: MutOrigin, state_origin: MutOrigin, num_stages: Int, cluster_shape: IndexList[3, element_type=DType.uint32], rasterize_order: RasterOrder, block_swizzle_size: Int]

Context for warps that do work THEN advance (Load/Scheduler/Epilogue).

  • enter: Returns current work_info for use in the block
  • exit: Fetches next work, assigns to work_info, steps state

Fields

  • scheduler (AdvanceAfterWorkContext[work_origin, state_origin, num_stages, cluster_shape, rasterize_order, block_swizzle_size].SchedulerType):
  • work_info_ptr (Pointer[WorkInfo, work_origin]):
  • consumer_state_ptr (Pointer[PipelineState[num_stages], state_origin]):

Implemented traits

AnyType, Copyable, ImplicitlyCopyable, Movable, UnknownDestructibility

comptime members

__copyinit__is_trivial

comptime __copyinit__is_trivial = True

__del__is_trivial

comptime __del__is_trivial = True

__moveinit__is_trivial

comptime __moveinit__is_trivial = True

SchedulerType

comptime SchedulerType = TileScheduler[num_stages, cluster_shape, rasterize_order, block_swizzle_size]

Methods

__init__

__init__(scheduler: TileScheduler[num_stages, cluster_shape, rasterize_order, block_swizzle_size], work_info_ptr: Pointer[WorkInfo, work_origin], consumer_state_ptr: Pointer[PipelineState[num_stages], state_origin]) -> Self

__enter__

__enter__(self) -> WorkInfo

Returns:

WorkInfo

__exit__

__exit__(mut self)

Was this page helpful?