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
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 (
Int): - βrank_n (
Int): - βpeer_cta_coord (
Tuple[Int, Int, Int]): - βa_multicast_mask (
UInt16): - βb_multicast_mask (
UInt16): - βmma_complete_mask (
Int): - βptr_tmem_addr (
UnsafePointer[UInt32, MutAnyOrigin, address_space=AddressSpace.SHARED]):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyDestructible,
Movable
comptime membersβ
TmemAddrArrayβ
comptime TmemAddrArray = SMemArray[UInt32, 1]
Methodsβ
__init__β
__init__(out self, ptr_tmem_addr: UnsafePointer[UInt32, MutAnyOrigin, address_space=AddressSpace.SHARED])
Initialize context from TMEM pointer; computes all derived state.
__init__(out self, tmem_addr: SMemArray[UInt32, 1])
Initialize context from typed TMEM address array.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!