Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoslucianops committed Dec 6, 2024
1 parent e5d994e commit c11c3e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nvdsinfer_custom_impl_Yolo/layers/upsample_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ upsampleLayer(int layerIdx, std::map<std::string, std::string>& 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);
Expand Down
4 changes: 2 additions & 2 deletions nvdsinfer_custom_impl_Yolo/yolo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c11c3e4

Please sign in to comment.