Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Wrap NervanaGPU import into a try/catch block
Browse files Browse the repository at this point in the history
Running on CPU-only machines invokes an error when this code attempts to import NervanaGPU.
  • Loading branch information
hanlin-nervana authored Jul 7, 2016
1 parent b8b8b15 commit a01a2d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion neon/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@

# These are imported to register the backends with the factory
import neon.backends.nervanacpu
import neon.backends.nervanagpu

try:
import neon.backends.nervanagpu
except ImportError:
pass

try:
# Register if it exists
Expand Down

0 comments on commit a01a2d9

Please sign in to comment.