[Bugfix] Replace BaseException with specific exceptions in FLA utils (#31590)
Signed-off-by: c0de128 <kevin.mckay@outlook.com>
This commit is contained in:
@@ -119,7 +119,7 @@ def input_guard(fn: Callable[..., torch.Tensor]) -> Callable[..., torch.Tensor]:
|
|||||||
def get_available_device() -> str:
|
def get_available_device() -> str:
|
||||||
try:
|
try:
|
||||||
return triton.runtime.driver.active.get_current_target().backend
|
return triton.runtime.driver.active.get_current_target().backend
|
||||||
except BaseException:
|
except (RuntimeError, AttributeError):
|
||||||
return "cpu"
|
return "cpu"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user