IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Mojo struct

TileScheduler

struct TileScheduler[problem_shape: IndexList[3], tile_shape: IndexList[3], grid_shape: IndexList[2], cluster: IndexList[3] = Index[Int, Int, Int](1, 1, 1), raster_dim: UInt32 = UInt32(1), schedule: MatmulSchedule = MatmulSchedule.TILE2D]

Fields​

  • ​idx (UInt32):
  • ​prob_shape (IndexList[3]):
  • ​num_waves_m (UInt32):
  • ​num_waves_n (UInt32):
  • ​log_num_waves_n (FastDiv[DType.uint32]):
  • ​current_iter (Int):
  • ​num_aligned_m_blocks (UInt32):
  • ​num_blocks (UInt32):

Implemented traits​

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDeletable, Movable, RegisterPassable, TrivialRegisterPassable

comptime members​

kNum1DBlocksPerGroup​

comptime kNum1DBlocksPerGroup = UInt32(16)

kNumNBlocks​

comptime kNumNBlocks = SIMD(ceildiv(problem_shape[1], tile_shape[1]))

num_grids​

comptime num_grids = SIMD((grid_shape[0] * grid_shape[1]))

wave_shape​

comptime wave_shape = Index[Int, Int, dtype=DType.uint32]((tile_shape[0] * grid_shape[1]), (tile_shape[1] * grid_shape[0]))

Methods​

__init__​

def __init__(prob_shape: IndexList[3]) -> Self

get_current_work_info​

def get_current_work_info(mut self) -> WorkInfo

Returns:

WorkInfo

advance​

def advance(mut self)

fetch_next_work​

def fetch_next_work(mut self) -> WorkInfo

Returns:

WorkInfo

num_output_tiles​

def num_output_tiles(self) -> Int

Returns:

Int

fetch_next_work_ds​

def fetch_next_work_ds(mut self) -> WorkInfo

Returns:

WorkInfo