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 module

sync

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​

Was this page helpful?