IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /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 in val to store (inferred).

Args:

Was this page helpful?