"vscode:/vscode.git/clone" did not exist on "d387e8e376ba78f6c6006d9ee017e613ae9dcd76"
Unverified Commit ec272dda authored by kk's avatar kk Committed by GitHub
Browse files

Temporay work-around for rocm 7.0.0 alpha with enabling data-parallel issue (#10434)


Co-authored-by: default avatarwunhuang <wunhuang@amd.com>
Co-authored-by: default avatarSai Enduri <saimanas.enduri@amd.com>
parent a220c14f
...@@ -17,6 +17,7 @@ from sglang.srt.distributed import ( ...@@ -17,6 +17,7 @@ from sglang.srt.distributed import (
get_tp_group, get_tp_group,
tensor_model_parallel_all_reduce, tensor_model_parallel_all_reduce,
) )
from sglang.srt.utils import get_bool_env_var, is_hip
if TYPE_CHECKING: if TYPE_CHECKING:
from sglang.srt.configs.model_config import ModelConfig from sglang.srt.configs.model_config import ModelConfig
...@@ -36,6 +37,9 @@ _LOCAL_ATTN_DP_SIZE: Optional[int] = None ...@@ -36,6 +37,9 @@ _LOCAL_ATTN_DP_SIZE: Optional[int] = None
_LOCAL_ATTN_DP_RANK: Optional[int] = None _LOCAL_ATTN_DP_RANK: Optional[int] = None
_ENABLE_DP_ATTENTION_FLAG: bool = False _ENABLE_DP_ATTENTION_FLAG: bool = False
_is_hip = is_hip()
_USE_ROCM700A_WA = _is_hip and get_bool_env_var("SGLANG_USE_ROCM700A")
class DpPaddingMode(IntEnum): class DpPaddingMode(IntEnum):
...@@ -67,7 +71,12 @@ class DpPaddingMode(IntEnum): ...@@ -67,7 +71,12 @@ class DpPaddingMode(IntEnum):
@classmethod @classmethod
def get_default_mode_in_cuda_graph(cls) -> DpPaddingMode: def get_default_mode_in_cuda_graph(cls) -> DpPaddingMode:
return cls.MAX_LEN # TODO(kkhuang-amd): noqa, temporary work-around for rocm 7.0.0 alpha
# it can be safely removed later, once RCCL fixed
if _USE_ROCM700A_WA:
return cls.SUM_LEN
else:
return cls.MAX_LEN
class _DpGatheredBufferWrapper: class _DpGatheredBufferWrapper:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment