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_clc_barriers

def init_clc_barriers[num_clc_stages: Int](clc_full_ptr: MbarPtr, clc_empty_ptr: MbarPtr, clc_producer_arv_count: Int32, clc_consumer_arv_count: Int32)

Initialize CLC full/empty barrier pairs.

Called inside the elect_one_warp && elect_one_thread guard for CLC-enabled kernels (default, block_scaled, blockwise_fp8, grouped_2sm).

Parameters:

  • ​num_clc_stages (Int): Number of CLC pipeline stages to initialize barriers for.

Args:

  • ​clc_full_ptr (MbarPtr): Shared-memory pointer to the CLC full barriers, one per pipeline stage.
  • ​clc_empty_ptr (MbarPtr): Shared-memory pointer to the CLC empty barriers, one per pipeline stage.
  • ​clc_producer_arv_count (Int32): Number of arrivals the producer makes on each CLC full barrier.
  • ​clc_consumer_arv_count (Int32): Number of arrivals the consumer makes on each CLC empty barrier.

Was this page helpful?