Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
9fc81ec7
Unverified
Commit
9fc81ec7
authored
Nov 14, 2025
by
QiliangCui
Committed by
GitHub
Nov 15, 2025
Browse files
[TPU] Fix import error in tpu launch (#28758)
Signed-off-by:
Qiliang Cui
<
derrhein@gmail.com
>
parent
186352b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
vllm/platforms/tpu.py
vllm/platforms/tpu.py
+9
-2
No files found.
vllm/platforms/tpu.py
View file @
9fc81ec7
...
@@ -9,20 +9,25 @@ from tpu_info import device
...
@@ -9,20 +9,25 @@ from tpu_info import device
from
vllm.inputs
import
ProcessorInputs
,
PromptType
from
vllm.inputs
import
ProcessorInputs
,
PromptType
from
vllm.logger
import
init_logger
from
vllm.logger
import
init_logger
from
vllm.sampling_params
import
SamplingParams
,
SamplingType
from
.interface
import
Platform
,
PlatformEnum
from
.interface
import
Platform
,
PlatformEnum
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
typing
import
TypeAlias
from
vllm.attention.backends.registry
import
AttentionBackendEnum
from
vllm.attention.backends.registry
import
AttentionBackendEnum
from
vllm.config
import
VllmConfig
from
vllm.config
import
VllmConfig
from
vllm.config.cache
import
BlockSize
from
vllm.config.cache
import
BlockSize
from
vllm.pooling_params
import
PoolingParams
from
vllm.pooling_params
import
PoolingParams
from
vllm.sampling_params
import
SamplingParams
ParamsType
:
TypeAlias
=
SamplingParams
|
PoolingParams
else
:
else
:
BlockSize
=
None
BlockSize
=
None
VllmConfig
=
None
VllmConfig
=
None
PoolingParams
=
None
PoolingParams
=
None
AttentionBackendEnum
=
None
AttentionBackendEnum
=
None
ParamsType
=
None
logger
=
init_logger
(
__name__
)
logger
=
init_logger
(
__name__
)
...
@@ -203,10 +208,12 @@ class TpuPlatform(Platform):
...
@@ -203,10 +208,12 @@ class TpuPlatform(Platform):
def
validate_request
(
def
validate_request
(
cls
,
cls
,
prompt
:
PromptType
,
prompt
:
PromptType
,
params
:
SamplingParams
|
Pooling
Params
,
params
:
Params
Type
,
processed_inputs
:
ProcessorInputs
,
processed_inputs
:
ProcessorInputs
,
)
->
None
:
)
->
None
:
"""Raises if this request is unsupported on this platform"""
"""Raises if this request is unsupported on this platform"""
from
vllm.sampling_params
import
SamplingParams
,
SamplingType
if
(
if
(
isinstance
(
params
,
SamplingParams
)
isinstance
(
params
,
SamplingParams
)
and
params
.
sampling_type
==
SamplingType
.
RANDOM_SEED
and
params
.
sampling_type
==
SamplingType
.
RANDOM_SEED
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment