From 7c7f9757a5157155536675379cec6b9fab5ea987 Mon Sep 17 00:00:00 2001 From: grimoire Date: Sun, 8 Jan 2023 15:58:46 +0800 Subject: [PATCH] check cuda_runtime and cudnn update --- src/core/impl/version.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/impl/version.cpp b/src/core/impl/version.cpp index 1e547f972..469acaa7b 100644 --- a/src/core/impl/version.cpp +++ b/src/core/impl/version.cpp @@ -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; -- GitLab