triton.language.atomic_store

triton.language.atomic_store(pointer, val, mask=None, sem=None, scope=None, _semantic=None)

Atomically stores val into the memory locations specified by pointer.

Parameters:
  • pointer (Block of dtype=triton.PointerDType) – The memory locations to store to.

  • val (Block of dtype=pointer.dtype.element_ty) – The values to store.

  • mask (Block of triton.int1, optional) – If mask[idx] is false, the corresponding store is not performed.

  • sem (str, optional) – Specifies the memory semantics. Acceptable values are “release” (default) and “relaxed”.

  • scope (str, optional) – Defines the scope of threads that observe the synchronizing effect. Acceptable values are “gpu” (default), “cta”, and “sys”.

This function can also be called as a member function on tensor, as x.atomic_store(...) instead of atomic_store(x, ...).