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
93f71673
Unverified
Commit
93f71673
authored
May 22, 2025
by
Li, Jiang
Committed by
GitHub
May 22, 2025
Browse files
[BugFix][CPU] Fix x86 SHM distributed module initialization (#18536)
Signed-off-by:
jiang.li
<
jiang1.li@intel.com
>
parent
3f505233
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
vllm/distributed/device_communicators/cpu_communicator.py
vllm/distributed/device_communicators/cpu_communicator.py
+6
-2
No files found.
vllm/distributed/device_communicators/cpu_communicator.py
View file @
93f71673
...
...
@@ -22,8 +22,10 @@ class CpuCommunicator(DeviceCommunicatorBase):
super
().
__init__
(
cpu_group
,
device
,
device_group
,
unique_name
)
self
.
dist_module
=
torch
.
distributed
if
(
current_platform
.
get_cpu_architecture
()
==
CpuArchEnum
.
X86
)
\
and
hasattr
(
torch
.
ops
.
_C
,
"init_shm_manager"
):
if
(
current_platform
.
get_cpu_architecture
()
==
CpuArchEnum
.
X86
)
and
hasattr
(
torch
.
ops
.
_C
,
"init_shm_manager"
)
and
unique_name
.
startswith
(
"tp"
):
self
.
dist_module
=
_CPUSHMDistributed
(
self
)
def
all_reduce
(
self
,
input_
):
...
...
@@ -96,6 +98,8 @@ class _CPUSHMDistributed:
def
__init__
(
self
,
communicator
:
CpuCommunicator
):
instance_identifier
=
os
.
environ
[
"VLLM_DIST_IDENT"
]
unique_name
=
communicator
.
unique_name
instance_identifier
=
f
"
{
instance_identifier
}
-
{
unique_name
}
"
self
.
communicator
=
communicator
group_ranks
=
[
str
(
rank
)
for
rank
in
self
.
communicator
.
ranks
]
...
...
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