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
5206ab20
Unverified
Commit
5206ab20
authored
Sep 16, 2025
by
Kunshang Ji
Committed by
GitHub
Sep 16, 2025
Browse files
[XPU] Fix circular import error. (#24927)
Signed-off-by:
Kunshang Ji
<
kunshang.ji@intel.com
>
parent
0af3ce13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
vllm/platforms/xpu.py
vllm/platforms/xpu.py
+5
-1
No files found.
vllm/platforms/xpu.py
View file @
5206ab20
...
@@ -9,7 +9,6 @@ import torch
...
@@ -9,7 +9,6 @@ import torch
import
vllm.envs
as
envs
import
vllm.envs
as
envs
from
vllm.logger
import
init_logger
from
vllm.logger
import
init_logger
from
vllm.utils
import
DEFAULT_MAX_NUM_BATCHED_TOKENS
from
vllm.utils
import
DEFAULT_MAX_NUM_BATCHED_TOKENS
from
vllm.v1.attention.backends.utils
import
set_kv_cache_layout
from
.interface
import
DeviceCapability
,
Platform
,
PlatformEnum
,
_Backend
from
.interface
import
DeviceCapability
,
Platform
,
PlatformEnum
,
_Backend
...
@@ -164,11 +163,16 @@ class XPUPlatform(Platform):
...
@@ -164,11 +163,16 @@ class XPUPlatform(Platform):
vllm_config
.
scheduler_config
.
max_num_batched_tokens
=
max
(
vllm_config
.
scheduler_config
.
max_num_batched_tokens
=
max
(
vllm_config
.
scheduler_config
.
max_model_len
,
vllm_config
.
scheduler_config
.
max_model_len
,
DEFAULT_MAX_NUM_BATCHED_TOKENS
)
DEFAULT_MAX_NUM_BATCHED_TOKENS
)
from
vllm.v1.attention.backends.utils
import
set_kv_cache_layout
set_kv_cache_layout
(
"NHD"
)
set_kv_cache_layout
(
"NHD"
)
logger
.
info
(
"Setting VLLM_KV_CACHE_LAYOUT to 'NHD' for XPU; "
logger
.
info
(
"Setting VLLM_KV_CACHE_LAYOUT to 'NHD' for XPU; "
"only NHD layout is supported by XPU attention kernels."
)
"only NHD layout is supported by XPU attention kernels."
)
@
classmethod
def
support_hybrid_kv_cache
(
cls
)
->
bool
:
return
True
@
classmethod
@
classmethod
def
is_pin_memory_available
(
cls
):
def
is_pin_memory_available
(
cls
):
return
True
return
True
...
...
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