Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
1a820e38
Unverified
Commit
1a820e38
authored
Jan 20, 2025
by
Chaitanya Sri Krishna Lolla
Committed by
GitHub
Jan 20, 2025
Browse files
Remove dependency of pynvml on ROCm (#2995)
parent
0ffcfdf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
python/sglang/srt/distributed/device_communicators/custom_all_reduce.py
...srt/distributed/device_communicators/custom_all_reduce.py
+8
-1
No files found.
python/sglang/srt/distributed/device_communicators/custom_all_reduce.py
View file @
1a820e38
...
@@ -6,7 +6,6 @@ from contextlib import contextmanager
...
@@ -6,7 +6,6 @@ from contextlib import contextmanager
from
functools
import
wraps
from
functools
import
wraps
from
typing
import
Callable
,
List
,
Optional
,
TypeVar
,
Union
from
typing
import
Callable
,
List
,
Optional
,
TypeVar
,
Union
import
pynvml
import
torch
import
torch
import
torch.distributed
as
dist
import
torch.distributed
as
dist
from
torch.distributed
import
ProcessGroup
from
torch.distributed
import
ProcessGroup
...
@@ -20,6 +19,14 @@ from sglang.srt.distributed.device_communicators.custom_all_reduce_utils import
...
@@ -20,6 +19,14 @@ from sglang.srt.distributed.device_communicators.custom_all_reduce_utils import
from
sglang.srt.distributed.parallel_state
import
in_the_same_node_as
from
sglang.srt.distributed.parallel_state
import
in_the_same_node_as
from
sglang.srt.utils
import
cuda_device_count_stateless
,
is_cuda
from
sglang.srt.utils
import
cuda_device_count_stateless
,
is_cuda
logger
=
logging
.
getLogger
(
__name__
)
if
is_cuda
():
try
:
import
pynvml
except
ImportError
as
e
:
logger
.
warning
(
"Failed to import pynvml with %r"
,
e
)
try
:
try
:
if
ops
.
use_vllm_custom_allreduce
:
if
ops
.
use_vllm_custom_allreduce
:
ops
.
meta_size
()
ops
.
meta_size
()
...
...
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