I created a project with own plugins based on gridAnchor_TRT and NMS_TRT. Everything works as expected on Windows but not on Ubuntu. Surprisingly while building engine this error appears: terminate called after throwing an instance of ‘std::invalid_argument’
what(): Trying to find reduced divisor for 0
The same code works fine on windows (with the same TRT and CUDA versions).
I thought the error could be caused by one of the cuda kernels that I implemented for my plugins. But as far as I know plugin’s method enqueue() is only called while execution of context->enqueueV2()(or executeV2()) but not while building the engine.
Do you have any suggestion? Because I have no idea how to localize this error.
**Nvidia Driver Version440:
**Operating System + VersionUbuntu 18.04:
Python Version (if applicable):
TensorFlow Version (if applicable):
**PyTorch Version (if applicable)1.2:
Baremetal or Container (if container which image + tag):
Please attach or include links to any models, data, files, or scripts necessary to reproduce your issue. (Github repo, Google Drive, Dropbox, etc.)
Steps To Reproduce
- Exact steps/commands to build your repro
- Exact steps/commands to run your repro
- Full traceback of errors encountered
Can you please share the sample script and model file to reproduce the issue so we can help better?
Project was tested in nvcr.io/nvidia/pytorch 20.03-py3 docker container https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel_20-03.html#rel_20-03
No additional dependencies are required, except those already presented in project.
link to github repository:
It seems liballClassNMS.so lib is missing in the github repo. Getting following error:
…/bin/libil: error while loading shared libraries: liballClassNMS.so: cannot open shared object file: No such file or directory
Please check in “faceDetection/Plugins/cuda/lib” it should be there. I apologize, you need to add a path to these libraries into environmental variables.
Will analyze the code and update you accordingly.
But model seems to be working fine using “trtexec” command, will recommend to use “trtexec” command for now:
trtexec --onnx=model.onnx --explicitBatch --verbose --saveEngine=test.trt
[05/26/2020-10:06:09] [I] percentile: 1.97314 ms at 99%
[05/26/2020-10:06:09] [I] total compute time: 2.9944 s
&&&& PASSED TensorRT.trtexec # trtexec --onnx=model.onnx --explicitBatch --verbose --saveEngine=test.trt
Absolutely, the model by itself works fine. Nevertheless, it is useless without plugins. And the problem appears when I try to add plugins.