[Chore] Clean up pytorch helper functions in vllm.utils (#26908)

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: isotr0py <2037008807@qq.com>
This commit is contained in:
Isotr0py
2025-10-19 00:48:22 +08:00
committed by GitHub
parent 5c2acb270a
commit 6ac5e06f7c
119 changed files with 772 additions and 714 deletions

View File

@@ -22,7 +22,8 @@ from vllm.logger import init_logger
from vllm.model_executor.layers.batch_invariant import (
vllm_is_batch_invariant,
)
from vllm.utils import cuda_device_count_stateless, update_environment_variables
from vllm.utils import update_environment_variables
from vllm.utils.torch_utils import cuda_device_count_stateless
logger = init_logger(__name__)

View File

@@ -17,7 +17,7 @@ from vllm.distributed.device_communicators.all_reduce_utils import (
from vllm.distributed.parallel_state import in_the_same_node_as
from vllm.logger import init_logger
from vllm.platforms import current_platform
from vllm.utils import cuda_device_count_stateless
from vllm.utils.torch_utils import cuda_device_count_stateless
try:
ops.meta_size()

View File

@@ -19,7 +19,7 @@ from vllm.distributed.device_communicators.pynccl_wrapper import (
)
from vllm.distributed.utils import StatelessProcessGroup
from vllm.logger import init_logger
from vllm.utils import current_stream
from vllm.utils.torch_utils import current_stream
logger = init_logger(__name__)
@@ -30,7 +30,7 @@ def register_nccl_symmetric_ops(pynccl_comm):
from vllm.distributed.device_communicators.pynccl_allocator import (
nccl_symm_mem_context,
)
from vllm.utils import direct_register_custom_op
from vllm.utils.torch_utils import direct_register_custom_op
global _NCCL_SYMM_OPS_REGISTERED
if _NCCL_SYMM_OPS_REGISTERED:

View File

@@ -13,7 +13,7 @@ from vllm.config import get_current_vllm_config
from vllm.distributed.parallel_state import in_the_same_node_as
from vllm.logger import init_logger
from vllm.platforms import current_platform
from vllm.utils import cuda_device_count_stateless
from vllm.utils.torch_utils import cuda_device_count_stateless
logger = init_logger(__name__)

View File

@@ -14,7 +14,7 @@ from vllm.distributed.device_communicators.base_device_communicator import (
)
from vllm.distributed.parallel_state import get_pp_group
from vllm.logger import init_logger
from vllm.utils import current_stream
from vllm.utils.torch_utils import current_stream
logger = init_logger(__name__)