core.context_parallel.groups#
Pure topology helpers shared by dynamic CP initialization and scheduling.
Module Contents#
Functions#
Return runtime CP sizes that can partition a DPxCP rank list exactly. |
API#
- core.context_parallel.groups.get_valid_dynamic_context_parallel_group_sizes(
- total_size: int,
Return runtime CP sizes that can partition a DPxCP rank list exactly.
Power-of-two subgroups are used when they evenly divide the rank list. The full DPxCP group is always valid and reuses the existing communicator.