Skip to content

Commit

Permalink
set error at backend initialisation not device
Browse files Browse the repository at this point in the history
  • Loading branch information
StRigaud committed Nov 21, 2024
1 parent b8979d9 commit 8d8b762
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pyclesperanto/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ def select_backend(backend: str = "opencl") -> str:
BackendManager.set_backend(backend=backend)
# reset current device to default one
select_device()

if _current_device._instance is None:
raise RuntimeError(
"No device available. Please check your system installation."
)

return f"{BackendManager.get_backend()} selected."


Expand Down

0 comments on commit 8d8b762

Please sign in to comment.