Mojo struct
TileScheduler
struct TileScheduler[num_stages: Int, cluster_shape: IndexList[3, element_type=DType.uint32] = Index[Int, Int, Int, dtype=DType.uint32](1, 1, 1), rasterize_order: RasterOrder = RasterOrder.AlongM, block_swizzle_size: Int = 8]
Fieldsβ
- βcluster_dim (
StaticTuple[Int32, 3]): - βlog_cluster_dim_m (
FastDiv[DType.uint32]): - βlog_cluster_dim_n (
FastDiv[DType.uint32]): - βlog_cluster_dim_k (
FastDiv[DType.uint32]): - βclc_response (
UnsafePointer[UInt128, MutAnyOrigin, address_space=AddressSpace.SHARED]): - βfull_mbar (
UnsafePointer[SharedMemBarrier, MutAnyOrigin, address_space=AddressSpace.SHARED]): - βempty_mbar (
UnsafePointer[SharedMemBarrier, MutAnyOrigin, address_space=AddressSpace.SHARED]):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime membersβ
cluster_sizeβ
comptime cluster_size = ((cluster_shape[0] * cluster_shape[1]) * cluster_shape[2])
log_cluster_kβ
comptime log_cluster_k = FastDiv(cluster_shape[2])
log_cluster_mβ
comptime log_cluster_m = FastDiv(cluster_shape[0])
log_cluster_nβ
comptime log_cluster_n = FastDiv(cluster_shape[1])
Methodsβ
__init__β
__init__(cluster_dim: StaticTuple[Int32, 3], clc_response_ptr: UnsafePointer[UInt128, address_space=AddressSpace.SHARED], full_mbar_ptr: UnsafePointer[SharedMemBarrier, address_space=AddressSpace.SHARED], empty_mbar_ptr: UnsafePointer[SharedMemBarrier, address_space=AddressSpace.SHARED]) -> Self
work_info_from_clc_responseβ
static work_info_from_clc_response(result: UnsafePointer[UInt128, address_space=AddressSpace.SHARED]) -> WorkInfo
Returns:
work_info_from_clusterβ
static work_info_from_cluster(work_info: WorkInfo, cluster_dim: StaticTuple[Int32, 3], log_cluster_dim_m: FastDiv[DType.uint32], log_cluster_dim_n: FastDiv[DType.uint32]) -> WorkInfo
Returns:
initial_work_infoβ
fetch_next_workβ
fetch_next_work(self, work_info: WorkInfo, consumer_state: PipelineState[num_stages]) -> WorkInfo
Returns:
advance_to_next_workβ
advance_to_next_work(self, mut clc_state: PipelineState[num_stages]) -> PipelineState[num_stages]
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!