helion.language.wait

helion.language.wait(signal_pad, index=None, signal=1, update=None, scope='gpu', hasSubsequentMemAccess=True)[source]

Wait for global memory barriers.

Spins on global memory barriers until the signal values is observed on all barriers.

Parameters:
  • signal_pad (Tensor | StackTensor) – Tensor of global memory barriers to wait on

  • index (list[object] | None) – Indices to index into the signal_pad tensor

  • signal (int) – the value to wait for

  • update (int | None) – Atomically update the signal_pad tensor with this value once the signal is observed. (default: None)

  • scope (str) – The scope of the lock (default: ‘gpu’)

  • hasSubsequentMemAccess (bool) – Whether the wait is followed by a subsequence memory access (default: True)

Return type:

None

Returns:

None