sync | Modular

Mojo module

This module provides GPU synchronization primitives and barriers.

The module includes:

  • Block-level synchronization barriers (barrier())
  • Warp-level synchronization (syncwarp())
  • Memory barriers (mbarrier) for NVIDIA GPUs
  • Instruction scheduling controls for AMD GPUs
  • Asynchronous copy and bulk transfer synchronization

The synchronization primitives help coordinate execution between threads within thread blocks and warps, and manage memory consistency across different memory spaces.

comptime values

MaxHardwareBarriers

comptime MaxHardwareBarriers = 16

Maximum number of hardware barriers available per block.

Structs

Functions