triton.experimental.gluon.language.nvidia.hopper.bulk.async_load
- triton.experimental.gluon.language.nvidia.hopper.bulk.async_load(smem, pointer, num_elements, barrier, pred=True, multicast=False, _semantic=None)
Copy contiguous global-memory ranges to shared memory asynchronously.
Requires compute capability 9.0+ and PTX 8.6+.
pointerandpredare scalars; both copy addresses must be 16-byte aligned. Each CTA copies a contiguous physical range. Swizzled destination layouts are supported, but the source must already have the desired physical ordering: the copy itself does not swizzle or gather. Padded and partitioned layouts, and views with holes, are unsupported.num_elementscounts destination elements across all distinct CTA tiles, excluding replicas, and must be a positive compile-time integer at mostsmem.numel. With multiple CTAs, including replicated layouts,num_elementsmust equalsmem.numel; partial copies are supported only with one CTA. The total is split equally between distinct tiles, and each per-CTA byte count must be a multiple of 16. If there areTdistinct tiles, source tileistarts at elementi * smem.numel // T. Thus the source is one contiguous range. Tiles follow increasing CTA-id order with replicated bits omitted: replicas read the same range, or one representative multicasts to them and their barriers whenmulticast=True.For a single-CTA partial copy, only the prefix is copied, but compiler dependencies and ConSan cover the entire destination view. Use sliced views to reuse other parts of the allocation independently.
Use separate completion barriers in each CTA, as returned by
mbarrier.allocate_mbarrier(); shared logical barriers are unsupported. Initialize the barrier, then callmbarrier.expect(barrier, bytes_per_cta)with the same predicate as the copy, wherebytes_per_cta = num_elements * smem.nbytes_per_cta // smem.numel. Wait on its current phase before reading or reusing the destination, modifying the source, or invalidating the barrier. This wait makes the copy visible to ordinary shared accesses. Before a multicast write, join the cluster after prior destination accesses, including other CTAs’ reads from a previous iteration; per-CTA completion waits do not join those readers.Make generic-proxy global writes visible to the asynchronous proxy before copying (see PTX
fence.proxy.async). GSan records source reads at issue time and may miss modifications racing with the pending copy.- Parameters:
smem – Destination shared-memory descriptor.
pointer – Scalar global-memory pointer.
num_elements – Compile-time total number of destination elements.
barrier – Completion mbarrier.
pred – Scalar predicate. Defaults to True.
multicast – Multicast to replicated CTAs. Defaults to False.