[Misc] Begin deprecation of get_tensor_model_*_group (#22494)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-08-08 01:11:54 -07:00
committed by GitHub
parent 1712543df6
commit 43c4f3d77c
3 changed files with 16 additions and 10 deletions
+12 -4
View File
@@ -36,6 +36,7 @@ from unittest.mock import patch
import torch
import torch.distributed
from torch.distributed import Backend, ProcessGroup
from typing_extensions import deprecated
import vllm.envs as envs
from vllm.distributed.device_communicators.base_device_communicator import (
@@ -894,8 +895,12 @@ def get_tp_group() -> GroupCoordinator:
return _TP
# kept for backward compatibility
get_tensor_model_parallel_group = get_tp_group
@deprecated("`get_tensor_model_parallel_group` has been replaced with "
"`get_tp_group` and may be removed after v0.12. Please use "
"`get_tp_group` instead.")
def get_tensor_model_parallel_group():
return get_tp_group()
_PP: Optional[GroupCoordinator] = None
@@ -921,8 +926,11 @@ def get_pp_group() -> GroupCoordinator:
return _PP
# kept for backward compatibility
get_pipeline_model_parallel_group = get_pp_group
@deprecated("`get_pipeline_model_parallel_group` has been replaced with "
"`get_pp_group` and may be removed in v0.12. Please use "
"`get_pp_group` instead.")
def get_pipeline_model_parallel_group():
return get_pp_group()
@contextmanager