chainer-char-rnn icon indicating copy to clipboard operation
chainer-char-rnn copied to clipboard

"cupy.cuda.runtime.CUDARuntimeError" on running with any GPU

Open pcgrosen opened this issue 9 years ago • 6 comments

Upon running python train.py, I receive this:

data/tinyshakespeare/input.txt
corpus length: 1115394
vocab size: 65
Traceback (most recent call last):
  File "train.py", line 67, in <module>
    cuda.get_device(args.gpu).use()
  File "cupy/cuda/device.pyx", line 73, in cupy.cuda.device.Device.use (cupy/cuda/device.cpp:1804)
  File "cupy/cuda/device.pyx", line 79, in cupy.cuda.device.Device.use (cupy/cuda/device.cpp:1753)
  File "cupy/cuda/runtime.pyx", line 147, in cupy.cuda.runtime.setDevice (cupy/cuda/runtime.cpp:2422)
  File "cupy/cuda/runtime.pyx", line 106, in cupy.cuda.runtime.check_status (cupy/cuda/runtime.cpp:1815)
cupy.cuda.runtime.CUDARuntimeError: cudaErrorUnknown: unknown error

This is a fresh installation of Ubuntu 15.04; I downloaded it for this purpose. Chainer was installed simply with pip install chainer, and I ran the Cuda installer with defaults.

Any help would be greatly appreciated. Thanks!

pcgrosen avatar Dec 27 '15 08:12 pcgrosen

@theradical any update on this? Getting same error.

deependersingla avatar Jan 11 '16 11:01 deependersingla

it seems gpu is not available on chainer. i changed code to use cpu by default. try again please.

yusuketomoto avatar Jan 11 '16 12:01 yusuketomoto

For me CPU is working right from start, @yusuketomoto so the GPU doesn't work for anyone?

deependersingla avatar Jan 11 '16 13:01 deependersingla

gpu is working for me.

try pip install chainer --no-cache after installing CUDA and setting path. following post might be helpful. https://github.com/pfnet/chainer https://goo.gl/sYx4MN

after install, you should try running chainer/examples/mnist/train_mnist.py on gpu to check if gpu works.

yusuketomoto avatar Jan 11 '16 13:01 yusuketomoto

same question here. any solutions?

xzyaoi avatar Feb 13 '18 09:02 xzyaoi

It's stupid, but have you tried turning it off and on again? Sometimes this happens to me and I simply have to reboot the server. I'm not sure what process needs to be restarted, but it doesn't seem to be anything to do with Chainer or cupy.

honnibal avatar Mar 27 '18 15:03 honnibal