Mojo struct
TileScheduler
struct TileScheduler[offsets_layout: Layout, //, *, static_MN: Int, tile_shape: IndexList[3], cluster: IndexList[3] = Index[Int, Int, Int](1, 1, 1), cta_group: Int = 1, swizzle: Bool = False, swapAB: Bool = True]
Fieldsβ
- βnum_active_experts (
Int): - βgroup_offsets (
LayoutTensor[DType.uint32, offsets_layout, ImmutAnyOrigin]): - βcurrent_iter (
Int32): - βcurrent_group_idx (
UInt32): - βcurrent_dynamic_dim_cumsum (
UInt32): - βblock_idx_start (
UInt32):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime membersβ
cta_group_tile_shapeβ
comptime cta_group_tile_shape = Index[Int, Int]((tile_shape[0] * cta_group), (tile_shape[1] * cta_group))
div_dynamic_blockβ
comptime div_dynamic_block = FastDiv(TileScheduler[static_MN=static_MN, tile_shape=tile_shape, cluster=cluster, cta_group=cta_group, swizzle=swizzle, swapAB=swapAB].cta_group_tile_shape[TileScheduler[static_MN=static_MN, tile_shape=tile_shape, cluster=cluster, cta_group=cta_group, swizzle=swizzle, swapAB=swapAB].dynamic_dim])
dynamic_dimβ
comptime dynamic_dim = 1 if swapAB else 0
kNum1DBlocksPerGroupβ
comptime kNum1DBlocksPerGroup = UInt32(16)
num_static_dim_blocksβ
comptime num_static_dim_blocks = SIMD(ceildiv(static_MN, tile_shape[TileScheduler[static_MN=static_MN, tile_shape=tile_shape, cluster=cluster, cta_group=cta_group, swizzle=swizzle, swapAB=swapAB].static_dim]))
static_dimβ
comptime static_dim = 0 if swapAB else 1
Methodsβ
__init__β
__init__(num_active_experts: Int, group_offsets: LayoutTensor[DType.uint32, offsets_layout, ImmutAnyOrigin]) -> Self
fetch_next_workβ
fetch_next_work(mut self) -> WorkInfo
Returns:
WorkInfo
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!