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

Mojo function

named_barrier_arrive

def named_barrier_arrive[num_threads: Int32](id: Int32 = Int32(0))

Arrives at a named synchronization barrier at the block level.

This function marks the arrival of a named synchronization barrier point using a specific barrier ID.

Notes:

  • Only supported on NVIDIA GPUs.
  • Maps directly to the nvvm.barrier.arrive instruction.
  • Useful for fine-grained synchronization when different subsets of threads need to synchronize independently.
  • The barrier ID must not exceed 16.
  • All threads participating in the barrier must specify the same num_threads value.

Parameters:

  • num_threads (Int32): The number of threads that must reach the barrier before any can proceed.

Args:

  • id (Int32): The barrier identifier (0-16). Default is 0.

Was this page helpful?