RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR for GRU

My model:


# Fully connected neural network with one hidden layer
class GRU_Model(nn.Module):
    def __init__(self, input_size, hidden_size, num_layers, num_classes):
        super(GRU_Model, self).__init__()
        self.num_layers = num_layers
        self.hidden_size = hidden_size
        self.gru = nn.GRU(input_size, hidden_size, num_layers, batch_first=True)
        # -> x needs to be: (batch_size, seq, input_size)
        
        # or:
        #self.gru = nn.GRU(input_size, hidden_size, num_layers, batch_first=True)
        #self.lstm = nn.LSTM(input_size, hidden_size, num_layers, batch_first=True)
        self.fc = nn.Linear(hidden_size, num_classes)
        
    def forward(self, x):
        # Set initial hidden states (and cell states for LSTM)
        h0 = torch.zeros(self.num_layers, x.size(0), self.hidden_size).to(device) 
        
        # Forward propagate RNN
        out, _ = self.gru(x, h0)  
        
        # Decode the hidden state of the last time step
        out = out[:, -1, :]
        # out: (n, 128)
         
        out = self.fc(out)
        # out: (n, 10)
        return out

Still found the same problem, but the previous time this model worked and I update the dataset, now It gives the same error, I update the driver and all dependencies also. I wave all information below. Please someone assist me. Thanks in advance.

Collecting environment information...
PyTorch version: 1.13.1
Is debug build: False
CUDA used to build PyTorch: 11.7
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 10 Pro
GCC version: (Rev5, Built by MSYS2 project) 5.3.0

Clang version: Could not collect
CMake version: Could not collect
Libc version: N/A

Python version: 3.7.13 (default, Mar 28 2022, 08:03:21) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.19041-SP0
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: GeForce RTX 2080 SUPER

GPU 1: GeForce RTX 2080 SUPER

Nvidia driver version: 461.40
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy==0.910
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.21.5
[pip3] pytorch-lightning==1.7.0
[pip3] pytorch-model-summary==0.1.1
[pip3] pytorch-tools==0.4.0
[pip3] pytorchtools==0.0.2
[pip3] torch==1.13.1
[pip3] torchaudio==0.13.1
[pip3] torchmetrics==0.9.3
[pip3] torchsummary==1.5.1
[pip3] torchvision==0.14.1
[pip3] torchviz==0.0.2
[conda] blas                      1.0                         mkl  
[conda] cudatoolkit               10.0.130                      0  
[conda] mkl                       2021.4.0           haa95532_640  
[conda] mkl-service               2.4.0            py37h2bbff1b_0  
[conda] mkl_fft                   1.3.1            py37h277e83a_0  
[conda] mkl_random                1.2.2            py37hf11a4ad_0  
[conda] numpy                     1.20.3                   pypi_0    pypi
[conda] numpy-base                1.21.5           py37hca35cd5_3  
[conda] pytorch                   1.13.1          py3.7_cuda11.7_cudnn8_0    pytorch
[conda] pytorch-cuda              11.7                 h16d0643_5    pytorch
[conda] pytorch-lightning         1.7.0                    pypi_0    pypi
[conda] pytorch-model-summary     0.1.1                      py_0    conda-forge
[conda] pytorch-mutex             1.0                        cuda    pytorch
[conda] pytorch-tools             0.4.0                    pypi_0    pypi
[conda] pytorchtools              0.0.2                    pypi_0    pypi
[conda] torchaudio                0.13.1                   pypi_0    pypi
[conda] torchmetrics              0.9.3                    pypi_0    pypi
[conda] torchsummary              1.5.1                    pypi_0    pypi
[conda] torchvision               0.13.0                   pypi_0    pypi
[conda] torchviz                  0.0.2                    pypi_0    pypi

Could you update to the latest stable or nightly release and check if you are still running into this error?

@ptrblck Thanks a lot for your response. I already solve the problem by updating. I updated my all dependencies