Skip to main content

Mojo struct

TileScheduler

@register_passable(trivial) struct TileScheduler[num_stages: Int, cluster_shape: IndexList[3, element_type=uint32] = Index(1, 1, 1), rasterize_order: RasterOrder = RasterOrder(1)]

Fields

  • cluster_dim (StaticTuple[SIMD[int32, 1], 3]):
  • log_cluster_dim_m (FastDiv[uint32]):
  • log_cluster_dim_n (FastDiv[uint32]):
  • log_cluster_dim_k (FastDiv[uint32]):
  • clc_response (UnsafePointer[SIMD[ui128, 1], address_space=AddressSpace(3)]):
  • full_mbar (UnsafePointer[SharedMemBarrier, address_space=AddressSpace(3)]):
  • empty_mbar (UnsafePointer[SharedMemBarrier, address_space=AddressSpace(3)]):

Implemented traits

AnyType, Copyable, ExplicitlyCopyable, Movable, UnknownDestructibility

Aliases

cluster_size

alias cluster_size = (cluster_shape.__getitem__[::Indexer](2) * cluster_shape.__getitem__[::Indexer](0) * cluster_shape.__getitem__[::Indexer](1))

log_cluster_k

alias log_cluster_k = FastDiv(cluster_shape.__getitem__[::Indexer](2))

log_cluster_m

alias log_cluster_m = FastDiv(cluster_shape.__getitem__[::Indexer](0))

log_cluster_n

alias log_cluster_n = FastDiv(cluster_shape.__getitem__[::Indexer](1))

Methods

__init__

__init__(cluster_dim: StaticTuple[SIMD[int32, 1], 3], clc_response_ptr: UnsafePointer[SIMD[ui128, 1], address_space=AddressSpace(3)], full_mbar_ptr: UnsafePointer[SharedMemBarrier, address_space=AddressSpace(3)], empty_mbar_ptr: UnsafePointer[SharedMemBarrier, address_space=AddressSpace(3)]) -> Self

work_info_from_clc_response

static work_info_from_clc_response(result: UnsafePointer[SIMD[ui128, 1], address_space=AddressSpace(3)]) -> WorkInfo

Returns:

WorkInfo

work_info_from_cluster

static work_info_from_cluster(work_info: WorkInfo, cluster_dim: StaticTuple[SIMD[int32, 1], 3], log_cluster_dim_m: FastDiv[uint32], log_cluster_dim_n: FastDiv[uint32]) -> WorkInfo

Returns:

WorkInfo

initial_work_info

initial_work_info(self) -> WorkInfo

Returns:

WorkInfo

fetch_next_work

fetch_next_work(self, work_info: WorkInfo, consumer_state: PipelineState[num_stages]) -> WorkInfo

Returns:

WorkInfo

advance_to_next_work

advance_to_next_work(self, mut clc_state: PipelineState[num_stages]) -> PipelineState[num_stages]

Returns:

PipelineState

Was this page helpful?