Sure, here you go. The following crashes when device is set to “cuda”, but runs fine with device set to “cpu”.
import torch
from torch import nn

device = "cpu"

grucell = nn.GRUCell(32, 32).to(device)

hidden_state = torch.rand(0, 32).to(device)
input_data = torch.rand(0, 32).to(device)

output_state = grucell(input_data, hidden_state)

print(output_state)