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);