8000 Clean up · sgl-project/sglang@372f59a · GitHub
[go: up one dir, main page]

Skip to content

Commit 372f59a

Browse files
lihaoyang-amdilmarkov
andcommitted
Clean up
Co-authored-by: ilmarkov <imarkov@redhat.com> Co-authored-by: Haoyang Li <haoyang.li@amd.com> Signed-off-by: Haoyang Li <Haoyang.Li@amd.com>
1 parent f52bd66 commit 372f59a

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

python/sglang/srt/distributed/device_communicators/custom_all_reduce.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
import logging
55
import os
66
from contextlib import contextmanager
7-
from functools import wraps
8-
from typing import Any, Callable, List, Optional, TypeVar, Union
7+
from typing import Any, List, Optional, Union
98

109
import torch
1110
import torch.distributed as dist
1211
from torch.distributed import ProcessGroup
13-
from typing_extensions import ParamSpec
1412

1513
from sglang.srt import _custom_ops as ops
1614
from sglang.srt.distributed.device_communicators.cuda_wrapper import CudaRTLibrary

python/sglang/srt/distributed/device_communicators/quick_all_reduce.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3-
import ctypes
43
import logging
54
import os
6-
from contextlib import contextmanager
75
from enum import Enum
8-
from functools import wraps
9-
from typing import Any, Callable, List, Optional, TypeVar, Union
6+
from typing import Union
107

118
import torch
129
import torch.distributed as dist
1310
from torch.distributed import ProcessGroup
14-
from typing_extensions import ParamSpec
1511

1612
from sglang.srt import _custom_ops as ops
17-
from sglang.srt.distributed.device_communicators.cuda_wrapper import CudaRTLibrary
1813
from sglang.srt.distributed.device_communicators.custom_all_reduce_utils import (
19-
gpu_p2p_access_check,
2014
is_full_nvlink,
2115
is_weak_contiguous,
2216
)
@@ -38,7 +32,7 @@
3832

3933

4034
def qr_rocm_arch_available():
41-
if not is_hip():
35+
if not _is_hip:
4236
return False
4337
try:
4438
props = torch.cuda.get_device_properties(0)

0 commit comments

Comments
 (0)
0