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 function
store_cluster_smem
def store_cluster_smem[dtype: DType, width: Int](local_ptr: Pointer[Scalar[dtype], address_space=AddressSpace.SHARED, _safe=False], peer_rank: UInt32, val: SIMD[dtype, width])
Store val into peer peer_rank's shared memory at local_ptr.
Symmetric to load_cluster_smem: writes the width elements into the same
shared object as it exists in CTA peer_rank. Bracket cross-CTA writes with
cluster_sync() so the peer observes them. 32-bit element dtypes only.
Parameters:
- βdtype (
DType): Element dtype of the shared buffer; must be a 32-bit dtype (inferred). - βwidth (
Int): Number of elements invalto store (inferred).
Args:
- βlocal_ptr (
Pointer[Scalar[dtype], address_space=AddressSpace.SHARED, _safe=False]): Pointer into this CTA's shared memory identifying the shared object to write. - βpeer_rank (
UInt32): Target CTA rank whose copy of the shared object receives the write. - βval (
SIMD[dtype, width]): Vector ofwidthelements to store into the peer's shared memory.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!