Script.atomic.global_exch

Script.atomic.global_exch

Script.atomic.global_exch(dst, values, *, sem='relaxed', scope='gpu', output=None)[source]

Element-wise atomic exchange on global memory.

old = dst[i]; dst[i] = values[i]. See shared_exch() for the caveat about exch having no red.* counterpart.

Notes

  • Thread group: Can be executed by any sized thread group.

  • Hardware: Requires compute capability 7.0+ (sm_70).

  • PTX: atom.{sem}.{scope}.global.exch.s32.

Parameters:
Return type:

RegisterTensor | None