Why is cudnn.benchmark set to 'false' by default? ditto for cudnn.fastest

5,085 views
Skip to first unread message

Hugh Perkins

unread,
Apr 10, 2016, 4:29:22 PM4/10/16
to torch7
Why is cudnn.benchmark set to 'false' by default? ditto for cudnn.fastest

Per https://github.com/soumith/cudnn.torch:

cudnn.benchmark = true -- uses the inbuilt cudnn auto-tuner to find the fastest convolution algorithms.
                       -- If this is set to false, uses some in-built heuristics that might not always be fastest.

Adam Paszke

unread,
Apr 10, 2016, 5:02:08 PM4/10/16
to torch7 on behalf of Hugh Perkins
Regarding cudnn.fastest, I think it’s because by default it also tries not to use very much memory, but when you enable fastest, it doesn’t care.

--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+un...@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.
Visit this group at https://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.

Hugh Perkins

unread,
Apr 10, 2016, 5:22:40 PM4/10/16
to torch7
Ah, ok.  Got it.  Thanks!

soumith

unread,
Apr 10, 2016, 6:12:37 PM4/10/16
to torch7 on behalf of Hugh Perkins
regarding cudnn.benchmark, if you have variable length sequences given as inputs, benchmark will try to auto-tune for every new input shape, and that will result in a huge slowdown.

--

Hugh Perkins

unread,
Apr 10, 2016, 6:17:20 PM4/10/16
to torch7
Ah, thats very important info.  Thank you!
Reply all
Reply to author
Forward
0 new messages