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
4e121310
Unverified
Commit
4e121310
authored
May 10, 2024
by
youkaichao
Committed by
GitHub
May 10, 2024
Browse files
[Core][Test] fix function name typo in custom allreduce (#4750)
parent
fcc2994b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
tests/distributed/test_custom_all_reduce.py
tests/distributed/test_custom_all_reduce.py
+2
-2
vllm/distributed/device_communicators/custom_all_reduce.py
vllm/distributed/device_communicators/custom_all_reduce.py
+4
-0
No files found.
tests/distributed/test_custom_all_reduce.py
View file @
4e121310
...
@@ -25,7 +25,7 @@ def graph_allreduce(world_size, rank, distributed_init_port):
...
@@ -25,7 +25,7 @@ def graph_allreduce(world_size, rank, distributed_init_port):
init_test_distributed_environment
(
1
,
world_size
,
rank
,
init_test_distributed_environment
(
1
,
world_size
,
rank
,
distributed_init_port
)
distributed_init_port
)
custom_all_reduce
.
init_custom_a
ll_reduce
()
custom_all_reduce
.
init_custom_a
r
()
for
sz
in
test_sizes
:
for
sz
in
test_sizes
:
for
dtype
in
[
torch
.
float32
,
torch
.
float16
,
torch
.
bfloat16
]:
for
dtype
in
[
torch
.
float32
,
torch
.
float16
,
torch
.
bfloat16
]:
with
custom_all_reduce
.
capture
():
with
custom_all_reduce
.
capture
():
...
@@ -61,7 +61,7 @@ def eager_allreduce(world_size, rank, distributed_init_port):
...
@@ -61,7 +61,7 @@ def eager_allreduce(world_size, rank, distributed_init_port):
distributed_init_port
)
distributed_init_port
)
sz
=
1024
sz
=
1024
custom_all_reduce
.
init_custom_a
ll_reduce
()
custom_all_reduce
.
init_custom_a
r
()
fa
=
custom_all_reduce
.
get_handle
()
fa
=
custom_all_reduce
.
get_handle
()
inp
=
torch
.
ones
(
sz
,
dtype
=
torch
.
float32
,
device
=
device
)
inp
=
torch
.
ones
(
sz
,
dtype
=
torch
.
float32
,
device
=
device
)
out
=
fa
.
all_reduce_unreg
(
inp
)
out
=
fa
.
all_reduce_unreg
(
inp
)
...
...
vllm/distributed/device_communicators/custom_all_reduce.py
View file @
4e121310
...
@@ -52,6 +52,10 @@ def init_custom_ar() -> None:
...
@@ -52,6 +52,10 @@ def init_custom_ar() -> None:
"current process. This might be the case if 'CUDA_VISIBLE_DEVICES'"
"current process. This might be the case if 'CUDA_VISIBLE_DEVICES'"
" is set."
)
" is set."
)
return
return
# we only use a subset of GPUs here
# so we only need to check the nvlink connectivity of these GPUs
num_dev
=
world_size
# test nvlink first, this will filter out most of the cases
# test nvlink first, this will filter out most of the cases
# where custom allreduce is not supported
# where custom allreduce is not supported
cuda_visible_devices
=
envs
.
CUDA_VISIBLE_DEVICES
cuda_visible_devices
=
envs
.
CUDA_VISIBLE_DEVICES
...
...
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