Caffe2 - C++ API
A deep learning, cross platform ML framework
common_cudnn.cc
1 #include "caffe2/core/common_cudnn.h"
2 #include "caffe2/core/cudnn_wrappers.h"
3 
4 #include "caffe2/core/init.h"
5 
6 namespace caffe2 {
7 
8 CuDNNWrapper::PerGPUCuDNNStates& CuDNNWrapper::cudnn_states() {
9  // New it (never delete) to avoid calling the destructors on process
10  // exit and racing against the CUDA shutdown sequence.
11  static auto* p = new CuDNNWrapper::PerGPUCuDNNStates();
12  CHECK_NOTNULL(p);
13  return *p;
14 }
15 
16 namespace {
17 bool PrintCuDNNInfo(int*, char***) {
18  VLOG(1) << "Caffe2 is built with CuDNN version " << CUDNN_VERSION;
19  return true;
20 }
21 
22 REGISTER_CAFFE2_INIT_FUNCTION(PrintCuDNNInfo, &PrintCuDNNInfo,
23  "Print CuDNN Info.");
24 
25 } // namespace
26 } // namespace caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13