[Bugfix][Hardware][AMD] Fix exception types in AITER MLA FP8 check (#31177)

Signed-off-by: c0de128 <kevin.mckay@outlook.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kevin McKay
2026-01-06 14:10:59 +08:00
committed by GitHub
co-authored by Claude Opus 4.5
parent 81323ea221
commit 1fb0209bbc
2 changed files with 129 additions and 1 deletions
+11 -1
View File
@@ -288,7 +288,17 @@ def _check_aiter_mla_fp8_support() -> bool:
_AITER_MLA_SUPPORTS_FP8 = (
"q_scale" in sig.parameters and "kv_scale" in sig.parameters
)
except Exception:
except (
ImportError,
ModuleNotFoundError,
AttributeError,
ValueError,
TypeError,
):
# ImportError/ModuleNotFoundError: aiter.mla module not available
# AttributeError: mla_decode_fwd doesn't exist
# ValueError: mla_decode_fwd has no signature (e.g., built-in)
# TypeError: mla_decode_fwd is not a callable
_AITER_MLA_SUPPORTS_FP8 = False
return _AITER_MLA_SUPPORTS_FP8