From 10ba96029c615a264792aa4242e9cc85cc6f92cb Mon Sep 17 00:00:00 2001 From: George Hotz Date: Wed, 22 Feb 2023 19:48:59 -0800 Subject: [PATCH] device: ImportError -> Exception --- tinygrad/lazy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinygrad/lazy.py b/tinygrad/lazy.py index 0a9fcc7ae2..8e1ba04090 100644 --- a/tinygrad/lazy.py +++ b/tinygrad/lazy.py @@ -19,7 +19,7 @@ LAZY = getenv("LAZY", 1) def get_buffer(name, base='tinygrad.llops'): try: return (name.upper(), [cls for cname, cls in inspect.getmembers(importlib.import_module(f'{base}.ops_{name}'), inspect.isclass) if (cname.lower() == name + "buffer")][0]) - except ImportError as e: # NOTE: this can't be put on one line due to mypy issue + except Exception as e: # NOTE: this can't be put on one line due to mypy issue print(name, "backend not available", e, file=sys.stderr) class _Device: