CreateSemaphore

uint32_t tt::tt_metal::CreateSemaphore(Program &program, const std::variant<CoreRange, CoreRangeSet> &core_spec, uint32_t initial_value)

Initializes semaphore on all cores within core range (inclusive). Each core can have up to eight 4B semaphores aligned to L1_ALIGNMENT.

Return value: Semaphore id (uint32_t). This can be used inside a kernel to extract the address using get_semaphore

Argument Description

program The program to which semaphore will be added to

core_spec Range of the Tensix coordinates using the semaphore

initial_value Initial value of the semaphore