IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo function

cp_async_bulk_tensor_shared_cluster_global_elect

def cp_async_bulk_tensor_shared_cluster_global_elect[dst_type: AnyType, mbr_type: AnyType, rank: Int, /, *, cta_group: Int = Int(1), eviction_policy: CacheEviction = CacheEviction.EVICT_NORMAL](dst_mem: Pointer[dst_type, address_space=AddressSpace.SHARED], tma_descriptor: Pointer[NoneType], mem_bar: Pointer[mbr_type, address_space=AddressSpace.SHARED], coords: IndexList[rank], elect: Int32)

Elect-predicated variant of cp_async_bulk_tensor_shared_cluster_global.

Behaves exactly like cp_async_bulk_tensor_shared_cluster_global except that the TMA instruction is guarded by a PTX predicate derived from elect: the instruction is issued only when elect != 0. All lanes follow the same PTX control flow, so there is no Mojo-level branch and no warp-divergent if elect != 0: wrapper at the call site.

Parameters:

  • ​dst_type (AnyType): The data type of the destination memory.
  • ​mbr_type (AnyType): The data type of the memory barrier.
  • ​rank (Int): The dimensionality of the tensor (1, 2, 3, 4, or 5).
  • ​cta_group (Int): The CTA group to use for the copy operation. Must be 1 or 2.
  • ​eviction_policy (CacheEviction): Optional cache eviction policy. Defaults to EVICT_NORMAL.

Args:

Was this page helpful?