[Bugfix] Replace BaseException with specific exceptions in FLA utils (#31590)

Signed-off-by: c0de128 <kevin.mckay@outlook.com>
This commit is contained in:
Kevin McKay
2026-01-01 21:27:54 -06:00
committed by GitHub
parent 1f5b7c41c3
commit 5fff44064b

View File

@@ -119,7 +119,7 @@ def input_guard(fn: Callable[..., torch.Tensor]) -> Callable[..., torch.Tensor]:
def get_available_device() -> str:
try:
return triton.runtime.driver.active.get_current_target().backend
except BaseException:
except (RuntimeError, AttributeError):
return "cpu"