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

init_core_barriers

def init_core_barriers[num_input_stages: Int, num_accum_stages: Int](input_barriers_ptr: MbarPtr, input_consumer_count: Int32, accum_barriers_ptr: MbarPtr, accum_producer_arv_count: Int32, accum_consumer_arv_count: Int32, tmem_dealloc_ptr: MbarPtr, tmem_dealloc_thread_count: Int32)

Initialize input, output, and TMEM deallocation barriers.

Called inside the elect_one_warp && elect_one_thread guard. Handles the three barrier init steps shared by all SM100 kernels.

Parameters:

  • ​num_input_stages (Int): Number of input pipeline stages to initialize barriers for.
  • ​num_accum_stages (Int): Number of accumulator pipeline stages to initialize barriers for.

Args:

  • ​input_barriers_ptr (MbarPtr): Shared-memory pointer to the input pipeline barriers.
  • ​input_consumer_count (Int32): Number of consumer arrivals on each input barrier.
  • ​accum_barriers_ptr (MbarPtr): Shared-memory pointer to the accumulator pipeline barriers.
  • ​accum_producer_arv_count (Int32): Number of producer arrivals on each accumulator barrier.
  • ​accum_consumer_arv_count (Int32): Number of consumer arrivals on each accumulator barrier.
  • ​tmem_dealloc_ptr (MbarPtr): Shared-memory pointer to the TMEM deallocation barrier.
  • ​tmem_dealloc_thread_count (Int32): Number of threads that arrive on the TMEM deallocation barrier.

Was this page helpful?