You could take the LLTM from the C+±extension tutorial as a blueprint. That should give very similar speedups as basing your work on the native code.
That said, in our own benchmarking JITed vanilla LSTM almost as fast as cudnn for the forward and roughly the same speed as PyTorch’s own C++ implementation for the backward (but slower by a factor of 2.25 than CuDNN) on current master (which is faster in the backward than 1.0 was at 3x).
Best regards
Thomas