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_global_shared_cta_elect
def cp_async_bulk_tensor_global_shared_cta_elect[src_type: AnyType, rank: Int, /, eviction_policy: CacheEviction = CacheEviction.EVICT_NORMAL](src_mem: Pointer[src_type, address_space=AddressSpace.SHARED], tma_descriptor: Pointer[NoneType], coords: IndexList[rank], elect: Int32)
Elect-predicated variant of cp_async_bulk_tensor_global_shared_cta.
Behaves exactly like cp_async_bulk_tensor_global_shared_cta except that the
TMA store 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:
- src_type (
AnyType): The data type of the source tensor elements. - rank (
Int): The dimensionality of the tensor (1, 2, 3, 4, or 5). - eviction_policy (
CacheEviction): Optional cache eviction policy. Defaults toEVICT_NORMAL.
Args:
- src_mem (
Pointer[src_type, address_space=AddressSpace.SHARED]): Pointer to the source data in shared memory. - tma_descriptor (
Pointer[NoneType]): Pointer to the TMA descriptor. - coords (
IndexList[rank]): Coordinates specifying which tile to copy. - elect (
Int32):0on non-elected lanes (skip the TMA), non-zero on the single elected lane (issue the TMA). Typically theInt32returned byelect()fromnn.attention.gpu.nvidia.common.