[Auto Sync] Update parallel_state.py (20250907) (#10126)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jzhou-xai <jzhou@x.ai>
This commit is contained in:
Lianmin Zheng
2025-09-07 02:12:32 -07:00
committed by GitHub
parent 111b137964
commit 617aa2b248

View File

@@ -1596,6 +1596,16 @@ def get_tensor_model_parallel_rank():
return get_tp_group().rank_in_group
def get_pipeline_model_parallel_world_size():
"""Return world size for the pipeline model parallel group."""
return get_pp_group().world_size
def get_pipeline_model_parallel_rank():
"""Return my rank for the pipeline model parallel group."""
return get_pp_group().rank_in_group
def get_moe_expert_parallel_world_size():
"""Return world size for the moe expert parallel group."""
return get_moe_ep_group().world_size