mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
print cudnn version
This commit is contained in:
@ -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(
|
||||
|
17
caffe2/core/common_cudnn.cc
Normal file
17
caffe2/core/common_cudnn.cc
Normal 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
|
Reference in New Issue
Block a user