From c11c3e4a7836aac501ab38cfe85985f557bf5037 Mon Sep 17 00:00:00 2001 From: Marcos Luciano Date: Thu, 5 Dec 2024 22:20:00 -0300 Subject: [PATCH] Fix build --- nvdsinfer_custom_impl_Yolo/layers/upsample_layer.cpp | 2 +- nvdsinfer_custom_impl_Yolo/yolo.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nvdsinfer_custom_impl_Yolo/layers/upsample_layer.cpp b/nvdsinfer_custom_impl_Yolo/layers/upsample_layer.cpp index 1357146..c8f696d 100644 --- a/nvdsinfer_custom_impl_Yolo/layers/upsample_layer.cpp +++ b/nvdsinfer_custom_impl_Yolo/layers/upsample_layer.cpp @@ -25,7 +25,7 @@ upsampleLayer(int layerIdx, std::map& block, nvinfer1: std::string resizeLayerName = "upsample_" + std::to_string(layerIdx); resize->setName(resizeLayerName.c_str()); -#if NV_TENSORRT_MAJOR >= 8 && NV_TENSORRT_MINOR > 4 +#if NV_TENSORRT_MAJOR > 8 || (NV_TENSORRT_MAJOR == 8 && NV_TENSORRT_MINOR > 4) resize->setResizeMode(nvinfer1::InterpolationMode::kNEAREST); #else resize->setResizeMode(nvinfer1::ResizeMode::kNEAREST); diff --git a/nvdsinfer_custom_impl_Yolo/yolo.cpp b/nvdsinfer_custom_impl_Yolo/yolo.cpp index 1ff18e0..b0d3bcc 100644 --- a/nvdsinfer_custom_impl_Yolo/yolo.cpp +++ b/nvdsinfer_custom_impl_Yolo/yolo.cpp @@ -77,7 +77,7 @@ Yolo::createEngine(nvinfer1::IBuilder* builder) if (m_NetworkType == "onnx") { -#if NV_TENSORRT_MAJOR >= 8 && NV_TENSORRT_MINOR > 0 +#if NV_TENSORRT_MAJOR > 8 || (NV_TENSORRT_MAJOR == 8 && NV_TENSORRT_MINOR > 0) parser = nvonnxparser::createParser(*network, *builder->getLogger()); #else parser = nvonnxparser::createParser(*network, logger); @@ -193,7 +193,7 @@ Yolo::createEngine(nvinfer1::IBuilder* builder) config->setProfilingVerbosity(nvinfer1::ProfilingVerbosity::kDETAILED); #endif -#if NV_TENSORRT_MAJOR >= 8 && NV_TENSORRT_MINOR > 0 +#if NV_TENSORRT_MAJOR > 8 || (NV_TENSORRT_MAJOR == 8 && NV_TENSORRT_MINOR > 0) nvinfer1::IRuntime* runtime = nvinfer1::createInferRuntime(*builder->getLogger()); #else nvinfer1::IRuntime* runtime = nvinfer1::createInferRuntime(logger);