Not 100% sure, but it looks to me rnn_tanh is defined by macro expansion in Aten/native/RNN.cpp 12
Where the macro is defined here 9 . It essentially dispatch to different implementations based on availability .  For the cuDNN implementation, it should be in Aten/native/cudnn/RNN.cpp