From aada52050ec80151f02bdac78c383ba10ffa1e89 Mon Sep 17 00:00:00 2001 From: Kakaru <97896816+KakaruHayate@users.noreply.github.com> Date: Mon, 13 Oct 2025 22:04:09 +0800 Subject: [PATCH] clean --- musa_utils.py | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/musa_utils.py b/musa_utils.py index d6de79dc..9cdde220 100644 --- a/musa_utils.py +++ b/musa_utils.py @@ -7,28 +7,7 @@ _musa_err_msg = "torch_musa not found or not configured correctly." try: if hasattr(torch, 'musa') and torch.musa.is_available(): - - try: - major, minor = torch.musa.get_device_capability() - version_val = major + minor / 10.0 - - if version_val < 2.1: - raise RuntimeError( - f"MUSA version check failed! " - f"Found capability {major}.{minor} (version value {version_val:.2f}), " - f"but this project requires a version >= 2.1. " - f"Please upgrade your torch_musa and MUSA SDK." - f"See: https://github.com/MooreThreads/torch_musa" - ) - - _musa_available = True - - except Exception as e: - _musa_err_msg = f"MUSA availability check failed: {e}" - if isinstance(e, RuntimeError): - raise e - _musa_available = False - + _musa_available = True except Exception: _musa_available = False @@ -96,4 +75,4 @@ def should_ddp(device_idx: int = 0) -> bool: else: return False -DEVICE: Optional[torch.device] = get_device() \ No newline at end of file +DEVICE: Optional[torch.device] = get_device()