mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
device: ImportError -> Exception
This commit is contained in:
parent
76b4d0577d
commit
10ba96029c
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue