The “native” implantations are in
https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/RNN.cpp 13 and
https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/cuda/RNN.cu
There also are CuDNN bindings…