main
py 20 lines 497 Bytes
Raw
1 # SPDX-License-Identifier: Apache-2.0
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
4 from vllm.logger import init_logger
5
6 logger = init_logger(__name__)
7
8
9 try:
10 from tpu_inference.platforms import (
11 TpuPlatform as TpuInferencePlatform,
12 )
13
14 TpuPlatform = TpuInferencePlatform # type: ignore
15 USE_TPU_INFERENCE = True
16 except ImportError:
17 logger.error(
18 "tpu_inference not found, please install tpu_inference to run vllm on TPU"
19 )
20 pass