mscclpp.language.thread_block_group

Classes

ThreadBlockGroup(tb_list)

A group of thread blocks with unique identifiers.

class mscclpp.language.thread_block_group.ThreadBlockGroup(tb_list)

Bases: object

A group of thread blocks with unique identifiers.

This class manages a collection of thread blocks, ensuring uniqueness and providing efficient lookup of thread block IDs.

Parameters:

tb_list (List[int])

get_internal_id(tb)

Get the ID of a thread block in this group.

Parameters:

tb (int) – The thread block object to look up

Return type:

int

Returns:

The integer ID of the thread block (0-indexed)

Raises:

ValueError – If the thread block is not in this group

numtb()

Return the number of thread blocks in the group.

Return type:

int