print cudnn version

This commit is contained in:
Yangqing Jia
2016-01-07 18:49:41 +00:00
parent 1c020d257b
commit e2b9172b4c
2 changed files with 22 additions and 1 deletions

View File

@ -67,14 +67,18 @@ cc_library(
whole_archive = True,
)
cc_headers(
cc_library(
name = "core_cudnn",
srcs = [
"common_cudnn.cc",
],
hdrs = [
"common_cudnn.h",
],
deps = [
"//third_party/cudnn:cudnn",
],
whole_archive = True,
)
cc_test(

View File

@ -0,0 +1,17 @@
#include <sstream>
#include "caffe2/core/common_cudnn.h"
#include "caffe2/core/init.h"
namespace caffe2 {
namespace {
bool PrintCuDNNInfo() {
CAFFE_LOG_INFO << "Caffe2 is built with CuDNN version " << CUDNN_VERSION;
return true;
}
REGISTER_CAFFE2_INIT_FUNCTION(PrintCuDNNInfo, &PrintCuDNNInfo,
"Print CuDNN Info for possible inspection.");
} // namespace
} // namespace caffe2