Skip to content

Commit

Permalink
Raise CuPy not available error early in cuda.GpuDevice initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
niboshi committed Dec 5, 2018
1 parent 0546ffa commit 0519c99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chainer/backends/cuda.py
Expand Up @@ -158,8 +158,8 @@ def __ne__(self, other):
class GpuDevice(_backend.Device):

def __init__(self, device):
assert isinstance(device, Device)
check_cuda_available()
assert isinstance(device, Device)

super(GpuDevice, self).__init__()
self.device = device
Expand Down

0 comments on commit 0519c99

Please sign in to comment.