jax.experimental.pallas.mosaic_gpu.semaphore_signal

jax.experimental.pallas.mosaic_gpu.semaphore_signal#

jax.experimental.pallas.mosaic_gpu.semaphore_signal(semaphore, inc=1, *, device_id=None, memory_scope='sys')[source]#

Signals a semaphore, optionally on a remote device.

This is the MGPU specific variant of pallas.semaphore_signal(), which additionally exposes the memory_scope of the underlying atomic.

Parameters:
  • semaphore – The semaphore reference to signal.

  • inc (int | jax.Array) – The increment value for the semaphore.

  • device_id (pallas_primitives.DeviceId | None) – Optional logical device id at which to signal the semaphore.

  • memory_scope (Literal['sys', 'gpu']) – The memory scope of the underlying atomic. Must be "sys" or "gpu". Defaults to "sys".