1 #ifndef CAFFE2_OPERATORS_CUDNN_OP_UTILS_H_ 2 #define CAFFE2_OPERATORS_CUDNN_OP_UTILS_H_ 4 #include "caffe2/core/cudnn_wrappers.h" 11 static constexpr
size_t kCONV_CUDNN_WORKSPACE_LIMIT_BYTES = 64 * 1024 * 1024;
17 #if CUDNN_VERSION_MIN(7, 0, 0) 21 static constexpr
size_t kNUM_CUDNN_FWD_ALGS =
22 2 * CUDNN_CONVOLUTION_FWD_ALGO_COUNT;
23 static constexpr
size_t kNUM_CUDNN_BWD_FILTER_ALGS =
24 2 * CUDNN_CONVOLUTION_BWD_FILTER_ALGO_COUNT;
25 static constexpr
size_t kNUM_CUDNN_BWD_DATA_ALGS =
26 2 * CUDNN_CONVOLUTION_BWD_DATA_ALGO_COUNT;
28 static constexpr
size_t kNUM_CUDNN_FWD_ALGS = 7;
29 static constexpr
size_t kNUM_CUDNN_BWD_FILTER_ALGS = 4;
30 static constexpr
size_t kNUM_CUDNN_BWD_DATA_ALGS = 5;
34 template <
typename ArrayOfcudnnConvolutionAlgoPerf_t>
35 inline void LogCuDNNPerfStats(
36 const ArrayOfcudnnConvolutionAlgoPerf_t& perf_stat,
37 int returned_algo_count) {
38 VLOG(1) <<
"Perf result: (algo: stat, time, memory)";
39 for (
int i = 0; i < returned_algo_count; ++i) {
40 const auto& stat = perf_stat[i];
41 VLOG(1) << stat.algo <<
": " << stat.status <<
" " << stat.time <<
" " 50 enum { ALGO_FWD = 0, ALGO_WGRAD = 1, ALGO_DGRAD = 2 };
54 #endif // CAFFE2_OPERATORS_CUDNN_OP_UTILS_H_ A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...