-
Notifications
You must be signed in to change notification settings - Fork 19.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Add cuDNN-accelerated LSTM and GRU to PyTorch #19177
Comments
@foxik Thanks for the issue! |
@haifeng-jin I am not sure I can do it correctly. I assume that
In any case, for the time being I unfortunately do not have time to work on this. |
This feature would be great indeed. Hopefully someone high capable will attend to this sometime soon. |
This issue is stale because it has been open for 180 days with no activity. It will be closed if no further activity occurs. Thank you. |
Hi,
are there any plans to add cuDNN-accelerated versions of LSTM and GRU to the PyTorch backend? Without cuDNN acceleration, the LSTM and GRU are considerably (several times) slower, even when running on GPU; however, we still use RNNs heavily (for example, adding them after Transformer encoder still helps in some cases).
The
torch.nn.LSTM
/torch.nn.GRU
offer cuDNN acceleration, and wrapping them to akeras.layers.Layer
works, but the resulting model is not backend-agnostic (so the resulting model cannot be used cross-frameworks).Thanks for consideration 🙏 and cheers!
PS: Relatedly,
torch.nn.LSTM/GRU
offers bidirectional computation by a single call (by passingbidirectional=True
) -- I am not sure how much faster it is compared to two asynchronous unidirectional computations, but if it is faster,keras.layers.Bidirectional
would probably have to be updated to handlekeras.layers.LSTM
andkeras.layers.GRU
specifically to support it.The text was updated successfully, but these errors were encountered: