Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Use CuDNN GRU for 6x faster RNN computation #2

Open
bzamecnik opened this issue Dec 12, 2017 · 3 comments
Open

Use CuDNN GRU for 6x faster RNN computation #2

bzamecnik opened this issue Dec 12, 2017 · 3 comments

Comments

@bzamecnik
Copy link

Keras 2.1.0 offers keras.layers.CuDNNGRU, a drop-in replacement for keras.layers.GRU, that's backed by an optimized implementation from CuDNN.

Speedup for the RNN computation observed in nvprof is 6x, similar to what's reported elsewhere about CuDNNGRU. Note that it needs TensorFlow, CuDNN and an NVIDIA GPU. For CPU usage it has to be replaced by ordinary GRU layer. Saved weights are compatible. In practice it works well.

@tobegit3hub
Copy link

tobegit3hub commented Apr 28, 2018

Thanks @bzamecnik and +1 for CudnnGRU.

@bzamecnik
Copy link
Author

@tobegit3hub: We've already enabled the new CuDNN-compatible GRU to our internal OCkRE code, so I hope to port it to the public one soon.

@bzamecnik
Copy link
Author

It looks that the upgrade to Keras 2 have not been published yet... This GRU needs Keras 2.1.5+, but 1.2.2 is in README.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants