提交 7c7f9757 编写于 作者: G grimoire 提交者: Wanwan1996

check cuda_runtime and cudnn

update
上级 526411fa
......@@ -26,7 +26,7 @@ Version mgb::get_version() {
#endif
}
#if __has_include("NvInfer.h")
#if __has_include("NvInfer.h") && MGB_ENABLE_TENSOR_RT
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
......@@ -41,7 +41,7 @@ int mgb::get_tensorrt_version() {
}
#endif
#if __has_include("cuda.h")
#if __has_include("cuda.h") && MGB_CUDA
#include "cuda.h"
int mgb::get_cuda_version() {
return CUDA_VERSION;
......@@ -52,7 +52,7 @@ int mgb::get_cuda_version() {
}
#endif
#if __has_include("cudnn.h")
#if __has_include("cudnn.h") && MGB_CUDA
#include "cudnn.h"
int mgb::get_cudnn_version() {
return CUDNN_VERSION;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册