Unverified Commit 956d805d authored by Lianmin Zheng's avatar Lianmin Zheng Committed by GitHub
Browse files

[Auto Sync] Update parallel_state.py (20250911) (#10326)


Co-authored-by: default avatargithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: default avatarByron Hsu <byronhsu1230@gmail.com>
parent 30c6e1f5
...@@ -1587,6 +1587,16 @@ def patch_tensor_parallel_group(tp_group: GroupCoordinator): ...@@ -1587,6 +1587,16 @@ def patch_tensor_parallel_group(tp_group: GroupCoordinator):
_TP = old_tp_group _TP = old_tp_group
def get_world_size():
"""Return world size for the world group."""
return get_world_group().world_size
def get_world_rank():
"""Return my rank for the world group."""
return get_world_group().rank_in_group
def get_tensor_model_parallel_world_size(): def get_tensor_model_parallel_world_size():
"""Return world size for the tensor model parallel group.""" """Return world size for the tensor model parallel group."""
return get_tp_group().world_size return get_tp_group().world_size
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment