[diffusion] multi-platform: support diffusion on amd and fix encoder loading on MI325 (#13760)

Co-authored-by: Sabre Shao <sabre.shao@amd.com>
Co-authored-by: Yusheng (Ethan) Su <yushengsu.thu@gmail.com>
Co-authored-by: Hubert Lu <Hubert.Lu@amd.com>
Co-authored-by: xsun <sunxiao04@gmail.com>
This commit is contained in:
Yuzhen Zhou
2025-12-19 02:38:46 -05:00
committed by GitHub
parent f2d64e6782
commit 4bf06635fc
34 changed files with 823 additions and 72 deletions

View File

@@ -945,6 +945,8 @@ class ServerArgs:
raise ValueError("pipeline_config is not set in ServerArgs")
self.pipeline_config.check_pipeline_config()
if self.attention_backend is None:
self._set_default_attention_backend()
# parallelism
self.check_server_dp_args()
@@ -966,6 +968,17 @@ class ServerArgs:
"Please use either sequence parallelism or tensor parallelism, not both."
)
def _set_default_attention_backend(self) -> None:
"""Configure ROCm defaults when users do not specify an attention backend."""
if current_platform.is_rocm():
default_backend = AttentionBackendEnum.AITER.name.lower()
self.attention_backend = default_backend
logger.info(
"Attention backend not specified. Using '%s' by default on ROCm "
"to match SGLang SRT defaults.",
default_backend,
)
@dataclasses.dataclass
class PortArgs: