-
Notifications
You must be signed in to change notification settings - Fork 312
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
Compatilibity with CuDNN R5 #239
Comments
@JoostvDoorn So torch supports this via R5 branch of the cudnn repository : https://github.com/soumith/cudnn.torch/tree/R5 . The rnn package can integrate with these but will not be automatically converted. Similarly to SeqLSTM, they expect tensors of size seqlen x batchsize x inputsize as input. I have already made changes to make integration easier by making Sequencer support Tensors as input as well : 8ac2707 . What are compatibility would you see fitting? |
I was thinking about automatic converison. In general I think there will be a demand for a module that is compatible with the cudnn modules for RNN/LSTM/GRU and that can then be converted using |
@JoostvDoorn Yes we should definitely at least make SeqLSTM support conversion via cudnn convert. Lets keep this ticket open until it gets done. |
@nicholas-leonard I have some basic conversion code ready for SeqLSTM, here: I am mainly wondering how we could include this within cudnn.convert (See also soumith/cudnn.torch#256) |
You can always send a PR to rnn so that we can do something like this: require 'cudnn'
require 'rnn'
-- define model
lstm = nn.Sequential()
:add(...
:add(nn.SeqLSTM())
..)
-- convert to cudnn where possible
culstm = lstm:cuconvert() Not sure if this use-case is simple enough to use and to code. What do you think? |
Sorry to butt in but is it currently possible to I have a model which wraps a sequencer around LookupTableZeroMAsk, FastLSTM, Linear (and few others like Dropout) but cudnn.convert only converts the ReLU ? And doesn't throw any errors. It looks like this -
And I call UPDATE : i checked #178 and they have problems with batched inputs for Let me know if I should move to a new issue thread for this. |
Note that there is no cudnn implementation of nn.Linear. Other than that you are right, and @nicholas-leonard Yes, I guess that would be the easiest approach. I can work on this, but it's not priority right now. |
@JoostvDoorn Yes, I realized that its implemented in cuBLAS soon after i posted the comment and updated my comment :D
I'm actually interested in the FastLSTM. But if you want me to move this to another thread, sure.
Could you please elaborate a bit? My understanding is that SeqLSTM is equivalent of (but faster than) It says in the README :
|
Nevermind. I interpreted the paper (i was reading) completely wrong. Got a test case working now. Thanks anyway! |
To follow up on this -- if I'm using rnn's LSTM implementation, will cudnn.convert() work to convert it? Are there any workarounds other than using cudnn.LSTM? |
@nicholas-leonard Do you have any thoughts on compatibility with CuDNN R5, and possible future roadmap of this package towards maturity? Possibly the modules that have been implemented in soumith/cudnn.torch would be helpful here as well for performance reasons.
The text was updated successfully, but these errors were encountered: