disable custom allreduce on HIP (#3058)
This commit is contained in:
@@ -41,6 +41,7 @@ from torch.distributed import Backend, ProcessGroup
|
|||||||
from sglang.srt.utils import (
|
from sglang.srt.utils import (
|
||||||
direct_register_custom_op,
|
direct_register_custom_op,
|
||||||
is_cuda_alike,
|
is_cuda_alike,
|
||||||
|
is_hip,
|
||||||
supports_custom_op,
|
supports_custom_op,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -952,6 +953,9 @@ _ENABLE_CUSTOM_ALL_REDUCE = True
|
|||||||
def set_custom_all_reduce(enable: bool):
|
def set_custom_all_reduce(enable: bool):
|
||||||
global _ENABLE_CUSTOM_ALL_REDUCE
|
global _ENABLE_CUSTOM_ALL_REDUCE
|
||||||
_ENABLE_CUSTOM_ALL_REDUCE = enable
|
_ENABLE_CUSTOM_ALL_REDUCE = enable
|
||||||
|
if enable and is_hip():
|
||||||
|
logger.warning("HIP doesn't support custom_all_reduce, so disable it.")
|
||||||
|
_ENABLE_CUSTOM_ALL_REDUCE = False
|
||||||
|
|
||||||
|
|
||||||
def init_distributed_environment(
|
def init_distributed_environment(
|
||||||
|
|||||||
Reference in New Issue
Block a user