config check sleep mode support oot platforms (#16562)

This commit is contained in:
Shuqiao Li
2025-04-14 16:31:50 -07:00
committed by GitHub
parent 1eb3c2ed48
commit d2020acac7
2 changed files with 7 additions and 2 deletions
+3
View File
@@ -148,6 +148,9 @@ class Platform:
"""Stateless version of :func:`torch.cuda.is_available`."""
return self._enum in (PlatformEnum.CUDA, PlatformEnum.ROCM)
def is_sleep_mode_available(self) -> bool:
return self._enum == PlatformEnum.CUDA
@classmethod
def get_attn_backend_cls(cls, selected_backend: _Backend, head_size: int,
dtype: torch.dtype, kv_cache_dtype: Optional[str],