Mojo struct
KernelContext
struct KernelContext[num_clc_pipeline_stages: Int, cta_group: Int, CLUSTER_M: Int, CLUSTER_N: Int]
Shared kernel state: election vars, CTA coords, multicast masks, pipeline states.
Fields
- elect_one_warp (
Bool): - elect_one_thread (
Bool): - elect_one_cta (
Bool): - is_first_cta_in_cluster (
Bool): - warp_id (
UInt32): - rank_m (
UInt): - rank_n (
UInt): - peer_cta_coord (
Tuple[UInt, UInt, UInt]): - a_multicast_mask (
UInt16): - b_multicast_mask (
UInt16): - mma_complete_mask (
Int): - ptr_tmem_addr (
LegacyUnsafePointer[UInt32, address_space=AddressSpace.SHARED]):
Implemented traits
AnyType,
Copyable,
Movable,
UnknownDestructibility
comptime members
__copyinit__is_trivial
comptime __copyinit__is_trivial = False
__del__is_trivial
comptime __del__is_trivial = False
__moveinit__is_trivial
comptime __moveinit__is_trivial = False
Methods
__init__
__init__(out self, ptr_tmem_addr: LegacyUnsafePointer[UInt32, address_space=AddressSpace.SHARED])
Initialize context from TMEM pointer; computes all derived state.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!