nn.LSTM and cuda()

Hi guys,

I created a model with nn.LSTM units. Then I send it to GPU by applying model.cuda() and got the following error:

raise CuDNNError(status)

torch.backends.cudnn.CuDNNError: 6: 1678329632
Exception ignored in: <bound method CuDNNHandle.del of <torch.backends.cudnn.CuDNNHandle object at 0x000001E1AC4EFCC0>>
Traceback (most recent call last):
File “C:\Users\Denis\AppData\Local\Continuum\Anaconda3\lib\site-packages\torch\backends\cudnn_init_.py”, line 96, in del
check_error(lib.cudnnDestroy(self))
ctypes.ArgumentError: argument 1: <class ‘TypeError’>: Don’t know how to convert parameter 1

If model consists of nn.LSTMCell - no error occurs.
I use pytorch 0.2.1 (because it supports my old graphic card, in Windows).
I tried pytorch 0.3.0 on another PC and it worked well without any error.

What should I do to send the model with nn.LSTM to GPU with cuda() on pytorch 0.2.1?