You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/06/29 22:56:50 UTC

[GitHub] safrooze commented on issue #11004: Only allocate cudnn-rnn dropout memory if dropout p > 0 and acquire descriptors during initialization

safrooze commented on issue #11004: Only allocate cudnn-rnn dropout memory if dropout p > 0 and acquire descriptors during initialization
URL: https://github.com/apache/incubator-mxnet/pull/11004#issuecomment-401493676
 
 
   This is a simple test that on V100, runs about 4.5x (i.e. 450%) faster after the change! The code times the total execution, but profiling shows very similar results for specifically RNN operator.
   
   ```python
       ctx = mx.gpu()
       batch_size = 1
       seq_len = 120 + 45
       channels = 454
   
       net = gluon.rnn.LSTM(hidden_size=128, num_layers=2, layout='TNC', bidirectional=True)
       net.initialize(ctx=ctx)
       net.hybridize()
       data = mx.random.uniform(shape=(seq_len, batch_size, channels), ctx=ctx)
   
       out = list()
       for i in range(100):
           if i == 2:
               start_t = time()
           out.append(net(data))
       mx.nd.waitall()
       print("Elapsed time: {:3.2} sec".format(time() - start_t))
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services