[hardware] unify usage of is_tpu to current_platform.is_tpu() (#7102)

This commit is contained in:
youkaichao
2024-08-13 00:16:42 -07:00
committed by GitHub
parent 7025b11d94
commit 4d2dc5072b
8 changed files with 29 additions and 33 deletions

View File

@@ -2,8 +2,9 @@ from typing import List, Optional, Tuple, Union
from vllm.config import ParallelConfig
from vllm.logger import init_logger
from vllm.platforms import current_platform
from vllm.sequence import ExecuteModelRequest, IntermediateTensors
from vllm.utils import get_ip, is_hip, is_tpu, is_xpu
from vllm.utils import get_ip, is_hip, is_xpu
from vllm.worker.worker_base import WorkerWrapperBase
logger = init_logger(__name__)
@@ -111,7 +112,7 @@ def initialize_ray_cluster(
# Placement group is already set.
return
device_str = "GPU" if not is_tpu() else "TPU"
device_str = "GPU" if not current_platform.is_tpu() else "TPU"
# Create placement group for worker processes
current_placement_group = ray.util.get_current_placement_group()
if current_placement_group: