File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -50,12 +50,18 @@ static constexpr char kCUDNNBwdFilterAlgoCache[] = "kCUDNNBwdFilterAlgoCache";
50
50
static constexpr size_t kCONV_CUDNN_WORKSPACE_LIMIT_BYTES =
51
51
static_cast <size_t >(1024 ) * 1024 * 1024 ;
52
52
53
- static constexpr size_t kNUM_CUDNN_FWD_ALGS =
54
- CUDNN_CONVOLUTION_BWD_FILTER_ALGO_COUNT ;
53
+ # if CUDNN_VERSION_MIN(6, 0, 5)
54
+ static constexpr size_t kNUM_CUDNN_FWD_ALGS = CUDNN_CONVOLUTION_FWD_ALGO_COUNT ;
55
55
static constexpr size_t kNUM_CUDNN_BWD_FILTER_ALGS =
56
56
CUDNN_CONVOLUTION_BWD_FILTER_ALGO_COUNT;
57
57
static constexpr size_t kNUM_CUDNN_BWD_DATA_ALGS =
58
58
CUDNN_CONVOLUTION_BWD_DATA_ALGO_COUNT;
59
+ #else
60
+ // cuDNN v5 has no CUDNN_CONVOLUTION_FWD_ALGO_COUNT etc.
61
+ static constexpr size_t kNUM_CUDNN_FWD_ALGS = 7 ;
62
+ static constexpr size_t kNUM_CUDNN_BWD_FILTER_ALGS = 4 ;
63
+ static constexpr size_t kNUM_CUDNN_BWD_DATA_ALGS = 5 ;
64
+ #endif
59
65
60
66
template <typename T>
61
67
class CUDNNConvOpKernel : public framework ::OpKernel<T> {
You can’t perform that action at this time.
0 commit comments