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
235c9db8
Unverified
Commit
235c9db8
authored
Aug 29, 2025
by
Chaojun Zhang
Committed by
GitHub
Aug 29, 2025
Browse files
[XPU] support data parallel for MoE models on XPU (#22887)
Signed-off-by:
chzhang
<
chaojun.zhang@intel.com
>
parent
b668055a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
vllm/distributed/device_communicators/xpu_communicator.py
vllm/distributed/device_communicators/xpu_communicator.py
+11
-0
vllm/model_executor/layers/fused_moe/layer.py
vllm/model_executor/layers/fused_moe/layer.py
+2
-0
No files found.
vllm/distributed/device_communicators/xpu_communicator.py
View file @
235c9db8
...
...
@@ -7,8 +7,13 @@ import torch
import
torch.distributed
as
dist
from
torch.distributed
import
ProcessGroup
import
vllm.envs
as
envs
from
vllm.logger
import
init_logger
from
.base_device_communicator
import
DeviceCommunicatorBase
logger
=
init_logger
(
__name__
)
class
XpuCommunicator
(
DeviceCommunicatorBase
):
...
...
@@ -18,6 +23,12 @@ class XpuCommunicator(DeviceCommunicatorBase):
device_group
:
Optional
[
ProcessGroup
]
=
None
,
unique_name
:
str
=
""
):
super
().
__init__
(
cpu_group
,
device
,
device_group
,
unique_name
)
if
self
.
use_all2all
:
all2all_backend
=
envs
.
VLLM_ALL2ALL_BACKEND
if
all2all_backend
==
"naive"
:
from
.all2all
import
NaiveAll2AllManager
self
.
all2all_manager
=
NaiveAll2AllManager
(
self
.
cpu_group
)
logger
.
info
(
"Using naive all2all manager."
)
def
all_reduce
(
self
,
input_
)
->
torch
.
Tensor
:
dist
.
all_reduce
(
input_
,
group
=
self
.
device_group
)
...
...
vllm/model_executor/layers/fused_moe/layer.py
View file @
235c9db8
...
...
@@ -655,6 +655,8 @@ class UnquantizedFusedMoEMethod(FusedMoEMethodBase, CustomOp):
forward_native
=
forward_tpu
elif
current_platform
.
is_cpu
():
forward_native
=
forward_cpu
elif
current_platform
.
is_xpu
():
forward_native
=
forward_xpu
else
:
forward_native
=
forward_cuda
...
...
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