Compile and implement Yolo 5 ver 3.1 on Jetson Xavier NX / Jetpack 4.6

Hi,

We are trying to compile and implement Yolo 5 ver 3.1 on Jetson Xavier NX / Jetpack 4.6 as per:

tensorrtx/yolov5 at master · wang-xinyu/tensorrtx · GitHub

However we end up with this error after running “make” step. Kindly any advice:

robotic@Asp-roboticnx:~/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/build$ make
[ 25%] Building NVCC (Device) object CMakeFiles/myplugins.dir/myplugins_generated_yololayer.cu.o
/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(54): error: member function declared with “override” does not override a base class member

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(54): warning: function “nvinfer1::IPluginV2::enqueue(int32_t, const void *const *, void *const *, void *, cudaStream_t)” is hidden by “nvinfer1::YoloLayerPlugin::enqueue” – virtual function override intended?

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(85): warning: function “nvinfer1::IPluginV2Ext::configurePlugin(const nvinfer1::Dims *, int32_t, const nvinfer1::Dims *, int32_t, const nvinfer1::DataType *, const nvinfer1::DataType *, const __nv_bool *, const __nv_bool *, nvinfer1::PluginFormat, int32_t)” is hidden by “nvinfer1::YoloLayerPlugin::configurePlugin” – virtual function override intended?

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(87): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::detachFromContext” is incompatible with that of overridden function “nvinfer1::IPluginV2Ext::detachFromContext”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(85): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::configurePlugin” is incompatible with that of overridden function “nvinfer1::IPluginV2IOExt::configurePlugin(const nvinfer1::PluginTensorDesc *, int32_t, const nvinfer1::PluginTensorDesc *, int32_t)”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(82): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::attachToContext” is incompatible with that of overridden function “nvinfer1::IPluginV2Ext::attachToContext”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(80): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::canBroadcastInputAcrossBatch” is incompatible with that of overridden function “nvinfer1::IPluginV2Ext::canBroadcastInputAcrossBatch”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(78): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::isOutputBroadcastAcrossBatch” is incompatible with that of overridden function “nvinfer1::IPluginV2Ext::isOutputBroadcastAcrossBatch”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(76): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::getOutputDataType” is incompatible with that of overridden function “nvinfer1::IPluginV2Ext::getOutputDataType”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(74): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::getPluginNamespace” is incompatible with that of overridden function “nvinfer1::IPluginV2::getPluginNamespace”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(72): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::setPluginNamespace” is incompatible with that of overridden function “nvinfer1::IPluginV2::setPluginNamespace”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(70): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::clone” is incompatible with that of overridden function “nvinfer1::IPluginV2Ext::clone”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(70): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::clone” is incompatible with that of overridden function “nvinfer1::IPluginV2::clone”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(68): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::destroy” is incompatible with that of overridden function “nvinfer1::IPluginV2::destroy”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(66): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::getPluginVersion” is incompatible with that of overridden function “nvinfer1::IPluginV2::getPluginVersion”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(64): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::getPluginType” is incompatible with that of overridden function “nvinfer1::IPluginV2::getPluginType”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(60): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::supportsFormatCombination” is incompatible with that of overridden function “nvinfer1::IPluginV2IOExt::supportsFormatCombination”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(58): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::serialize” is incompatible with that of overridden function “nvinfer1::IPluginV2::serialize”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(56): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::getSerializationSize” is incompatible with that of overridden function “nvinfer1::IPluginV2::getSerializationSize”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(52): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::getWorkspaceSize” is incompatible with that of overridden function “nvinfer1::IPluginV2::getWorkspaceSize”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(50): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::terminate” is incompatible with that of overridden function “nvinfer1::IPluginV2::terminate”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(48): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::initialize” is incompatible with that of overridden function “nvinfer1::IPluginV2::initialize”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(46): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::getOutputDimensions” is incompatible with that of overridden function “nvinfer1::IPluginV2::getOutputDimensions”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(41): error: exception specification for virtual function “nvinfer1::YoloLayerPlugin::getNbOutputs” is incompatible with that of overridden function “nvinfer1::IPluginV2::getNbOutputs”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(124): error: exception specification for virtual function “nvinfer1::YoloPluginCreator::getPluginNamespace” is incompatible with that of overridden function “nvinfer1::IPluginCreator::getPluginNamespace”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(119): error: exception specification for virtual function “nvinfer1::YoloPluginCreator::setPluginNamespace” is incompatible with that of overridden function “nvinfer1::IPluginCreator::setPluginNamespace”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(117): error: exception specification for virtual function “nvinfer1::YoloPluginCreator::deserializePlugin” is incompatible with that of overridden function “nvinfer1::IPluginCreator::deserializePlugin”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(115): error: exception specification for virtual function “nvinfer1::YoloPluginCreator::createPlugin” is incompatible with that of overridden function “nvinfer1::IPluginCreator::createPlugin”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(113): error: exception specification for virtual function “nvinfer1::YoloPluginCreator::getFieldNames” is incompatible with that of overridden function “nvinfer1::IPluginCreator::getFieldNames”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(111): error: exception specification for virtual function “nvinfer1::YoloPluginCreator::getPluginVersion” is incompatible with that of overridden function “nvinfer1::IPluginCreator::getPluginVersion”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.h(109): error: exception specification for virtual function “nvinfer1::YoloPluginCreator::getPluginName” is incompatible with that of overridden function “nvinfer1::IPluginCreator::getPluginName”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/utils.h(41): error: exception specification for virtual function “Tn::Profiler::reportLayerTime” is incompatible with that of overridden function “nvinfer1::IProfiler::reportLayerTime”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/utils.h(60): error: exception specification for virtual function “Tn::Logger::log” is incompatible with that of overridden function “nvinfer1::ILogger::log”

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.cu(156): error: object of abstract class type “nvinfer1::YoloLayerPlugin” is not allowed:
pure virtual function “nvinfer1::IPluginV2::enqueue” has no overrider

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.cu(299): error: object of abstract class type “nvinfer1::YoloLayerPlugin” is not allowed:
pure virtual function “nvinfer1::IPluginV2::enqueue” has no overrider

/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/yololayer.cu(308): error: object of abstract class type “nvinfer1::YoloLayerPlugin” is not allowed:
pure virtual function “nvinfer1::IPluginV2::enqueue” has no overrider

34 errors detected in the compilation of “/tmp/tmpxft_00002fb8_00000000-6_yololayer.cpp1.ii”.
CMake Error at myplugins_generated_yololayer.cu.o.Debug.cmake:280 (message):
Error generating file
/home/robotic/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/build/CMakeFiles/myplugins.dir//./myplugins_generated_yololayer.cu.o

CMakeFiles/myplugins.dir/build.make:75: recipe for target ‘CMakeFiles/myplugins.dir/myplugins_generated_yololayer.cu.o’ failed
make[2]: *** [CMakeFiles/myplugins.dir/myplugins_generated_yololayer.cu.o] Error 1
CMakeFiles/Makefile2:84: recipe for target ‘CMakeFiles/myplugins.dir/all’ failed
make[1]: *** [CMakeFiles/myplugins.dir/all] Error 2
Makefile:90: recipe for target ‘all’ failed
make: *** [all] Error 2
robotic@Asp-roboticnx:~/YOLO_5_ver_1_6/TensorRT_3.1_old/tensorrtx-yolov5-v3.1/yolov5/build$

Hi,

Please note that JetPack 4.6 contains TensorRT v8.0.
It seems that the repository adds the TensorRT 8.0 support recently.

The yolov5-v3.1 branch might need an older TensorRT version.
Please confirm this with the repository owner or try if it works on JetPack 4.5.1 (TensorRT v7.1).

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.