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

elect_one_sync

def elect_one_sync() -> Bool

Elects a single thread within a warp to perform an operation.

Note:

  • Only supported on NVIDIA SM90+ GPUs.
  • Maps directly to the elect.sync instruction in CUDA PTX.
  • Useful for having a single thread perform an operation while maintaining warp synchronization.

Returns:

Bool: True for the elected thread, False for all other threads in the warp.