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
1b5aa25e
Commit
1b5aa25e
authored
Jan 04, 2026
by
xiabo
Browse files
区分pcie和hglink custom allreduce的使用
parent
c6a9b490
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
vllm/distributed/device_communicators/custom_all_reduce.py
vllm/distributed/device_communicators/custom_all_reduce.py
+6
-3
vllm/envs.py
vllm/envs.py
+1
-1
No files found.
vllm/distributed/device_communicators/custom_all_reduce.py
View file @
1b5aa25e
...
@@ -264,10 +264,13 @@ class CustomAllreduce:
...
@@ -264,10 +264,13 @@ class CustomAllreduce:
return
None
return
None
if
self
.
_IS_CAPTURING
:
if
self
.
_IS_CAPTURING
:
if
torch
.
cuda
.
is_current_stream_capturing
():
if
torch
.
cuda
.
is_current_stream_capturing
():
if
not
envs
.
VLLM_CUSTOM_CACHE
:
if
envs
.
VLLM_CUSTOM_CACHE
:
return
self
.
all_reduce
(
input
,
registered
=
False
)
else
:
return
self
.
all_reduce
(
input
,
registered
=
True
)
return
self
.
all_reduce
(
input
,
registered
=
True
)
else
:
if
not
self
.
fully_connected
:
return
self
.
all_reduce
(
input
,
registered
=
False
)
else
:
return
self
.
all_reduce
(
input
,
registered
=
True
)
else
:
else
:
# If warm up, mimic the allocation pattern since custom
# If warm up, mimic the allocation pattern since custom
# allreduce is out-of-place.
# allreduce is out-of-place.
...
...
vllm/envs.py
View file @
1b5aa25e
...
@@ -1080,7 +1080,7 @@ environment_variables: dict[str, Callable[[], Any]] = {
...
@@ -1080,7 +1080,7 @@ environment_variables: dict[str, Callable[[], Any]] = {
# flag to control vllm to use optimized kernels
# flag to control vllm to use optimized kernels
"VLLM_CUSTOM_CACHE"
:
"VLLM_CUSTOM_CACHE"
:
lambda
:
bool
(
int
(
os
.
environ
.
get
(
"VLLM_CUSTOM_CACHE"
,
"
1
"
))),
lambda
:
bool
(
int
(
os
.
environ
.
get
(
"VLLM_CUSTOM_CACHE"
,
"
0
"
))),
# flag to control vllm to use optimized kernels
# flag to control vllm to use optimized kernels
"VLLM_CUSTOM_ALLREDUCE_SUPPORTED_WORLDSIZE_MAX"
:
"VLLM_CUSTOM_ALLREDUCE_SUPPORTED_WORLDSIZE_MAX"
:
...
...
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