ttnn.split_work_to_cores
- ttnn.split_work_to_cores = <nanobind.nb_func object>
-
ttnn._ttnn.tensor.CoreCoord, units_to_divide: int, row_wise: bool = False) -> tuple[int, ttnn._ttnn.tensor.CoreRangeSet, ttnn._ttnn.tensor.CoreRangeSet, ttnn._ttnn.tensor.CoreRangeSet, int, int] split_work_to_cores(core_grid: ttnn._ttnn.tensor.CoreRangeSet, units_to_divide: int, row_wise: bool = False) -> tuple[int, ttnn._ttnn.tensor.CoreRangeSet, ttnn._ttnn.tensor.CoreRangeSet, ttnn._ttnn.tensor.CoreRangeSet, int, int]
Overloaded function.
-
split_work_to_cores(grid_size: ttnn._ttnn.tensor.CoreCoord, units_to_divide: int, row_wise: bool = False) -> tuple[int, ttnn._ttnn.tensor.CoreRangeSet, ttnn._ttnn.tensor.CoreRangeSet, ttnn._ttnn.tensor.CoreRangeSet, int, int]Split work units across cores in a grid.
This function divides a specified number of work units across cores in a grid. It returns information about how the work is distributed, including core ranges for different groups if work cannot be evenly divided.
- Args:
-
grid_size (ttnn.CoreCoord): The size of the core grid (x, y dimensions). units_to_divide (int): The total number of work units to distribute. row_wise (bool, optional): Whether to distribute work by iterating row-wise. Defaults to False.
- Returns:
-
- tuple: A tuple containing:
-
num_cores (int): Number of cores being used
all_cores (CoreRangeSet): All cores involved
core_group_1 (CoreRangeSet): Cores doing more work
core_group_2 (CoreRangeSet): Cores doing less work (empty if evenly divisible)
units_per_core_group_1 (int): Work units per core in group 1
units_per_core_group_2 (int): Work units per core in group 2
Example: >>> # Split 100 tiles across an 8x8 core grid >>> num_cores, all_cores, core_group_1, core_group_2, units_1, units_2 = \ … ttnn.split_work_to_cores(ttnn.CoreCoord(8, 8), 100) >>> print(f”Using {num_cores} cores, {units_1} units per core in group 1, {units_2} in group 2”)
-
split_work_to_cores(core_grid: ttnn._ttnn.tensor.CoreRangeSet, units_to_divide: int, row_wise: bool = False) -> tuple[int, ttnn._ttnn.tensor.CoreRangeSet, ttnn._ttnn.tensor.CoreRangeSet, ttnn._ttnn.tensor.CoreRangeSet, int, int]Split work units across cores in a CoreRangeSet.
This function divides a specified number of work units across cores in a CoreRangeSet. It returns information about how the work is distributed, including core ranges for different groups if work cannot be evenly divided.
- Args:
-
core_grid (ttnn.CoreRangeSet): The set of core ranges to distribute work across. units_to_divide (int): The total number of work units to distribute. row_wise (bool, optional): Whether to distribute work by iterating row-wise. Defaults to False.
- Returns:
-
- tuple: A tuple containing:
-
num_cores (int): Number of cores being used
all_cores (CoreRangeSet): All cores involved
core_group_1 (CoreRangeSet): Cores doing more work
core_group_2 (CoreRangeSet): Cores doing less work (empty if evenly divisible)
units_per_core_group_1 (int): Work units per core in group 1
units_per_core_group_2 (int): Work units per core in group 2
Example: >>> # Split 100 tiles across an 8x8 core grid >>> core_rangeset = ttnn.CoreRangeSet(ttnn.CoreRange(ttnn.CoreCoord(0,0), ttnn.CoreCoord(7,7))) >>> num_cores, all_cores, core_group_1, core_group_2, units_1, units_2 = \ … ttnn.split_work_to_cores(core_rangeset, 100) >>> print(f”Using {num_cores} cores, {units_1} units per core in group 1, {units_2} in group 2”)
- Type:
-
split_work_to_cores(grid_size
-