Skip to main content
Log in

Mojo struct

TransientScheduler

@register_passable(trivial) struct TransientScheduler[tile_shape: SIMD[uint32, 1], num_heads: SIMD[uint32, 1]]

Aliases

  • may_advance = False:
  • mha_schedule = MHASchedule(__init__[__mlir_type.!pop.int_literal](0)):

Implemented traits

AnyType, Copyable, ExplicitlyCopyable, MHATileScheduler, Movable, UnknownDestructibility

Methods

__init__

__init__() -> Self

get_current_work_info

get_current_work_info(self) -> WorkInfo

get_current_work_info(self, ts: MHATileSummary, state: MHATileState) -> WorkInfo

advance

advance[ragged: Bool, producer: Bool, sync: MHASchedulerSynchronization = MHASchedulerSynchronization(__init__[__mlir_type.!pop.int_literal](1))](self, ts: MHATileSummary, mut state: MHATileState, pipeline_idx: SIMD[uint32, 1]) -> OptionalReg[SeqInfo]

grid_dim

static grid_dim(batch_size: SIMD[uint32, 1], max_num_prompt_tiles: SIMD[uint32, 1]) -> Tuple[Int, Int, Int]

initial_state

initial_state(self, ptr: UnsafePointer[SIMD[uint32, 1], address_space=AddressSpace(3)], tile_summary: MHATileSummary) -> MHATileState

unsafe_seq_info

unsafe_seq_info[ragged: Bool](self, ts: MHATileSummary, state: MHATileState) -> SeqInfo