-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading plugins from libmyplugins.so with trtexec fails #107
Comments
@philipp-schmidt I never tried And why do you need |
Making it compatible would make it possible to deploy the model on Triton Inference Server and therefore probably also in Kubeflow. The use the same loading logic than trtexec and load the plugin library via the LD_PRELOAD env variable. This would make all the models in this repo even more awesome, and I'm pretty sure it is a minor change in the way the lib is compiled.
I will have a look into that. It is probably only a matter of calling the plugin initializer in the load logic in the lib. https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#add_custom_layer |
Can you try move |
Yes it worked already.
|
I can write a little PR on how to build and deploy this to Triton if you want. Triton really steps up the game I think. It takes care of Model Deployment and runs the model on multiple GPUs with overlapping data transfer and scheduling etc. |
@philipp-schmidt That would be great, Can you write a tutorial about Triton, put it in tensorrtx/tutorials and submit a PR? |
Looking forward for that guidance! @philipp-schmidt |
Hi @cesarandreslopez @wang-xinyu Currently my yolov3 implementation is twice as fast as our yolov4 here (its with int8 and without combining the three yolo layers at the end though so some of it is expected) Anyway, there will be so many changes that I might be putting it in a new repo. Ofc I will share any goodies with you here. |
Hi, I implemented everything to deploy to Triton and put it here: https://github.com/isarsoft/yolov4-triton-tensorrt If Triton is an alternative for you @cesarandreslopez instead of using TensorRT directly (Triton has some amazing benefits and it has a python SDK), maybe you give it a try. @wang-xinyu I included your license and mentioned you in the README. Feel free to copy the tutorial in my README for your repo if you want. Or you can link my repo. |
@philipp-schmidt , appreciate your work, but without having client infer code , it looks incomplete, looking forward for client infer script if you wish to opensource it. |
Client code will be the next thing I'll add. It's pretty straightforward so it should not take long. @sudapure Can you add an issue in my repo and tell me whether you want C++ or Python first? |
@philipp-schmidt looks very promising! Will check out soon and perhaps even contribute to some versions with other neural networks. Thanks, |
@philipp-schmidt Thanks for sharing. I will add a link in readme. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hey! is anyone working on this issue? I wanted to deploy yolov5 but seems to be getting some error while using trtexec : root@dae16f369f04:/usr/src/tensorrt/bin# ./trtexec --loadengine=yolov5s.engine --plugins=libmyplugins.so
&&&& RUNNING TensorRT.trtexec # ./trtexec --loadengine=yolov5s.engine --plugins=libmyplugins.so
[03/27/2021-13:48:29] [E] Model missing or format not recognized
&&&& FAILED TensorRT.trtexec # ./trtexec --loadengine=yolov5s.engine --plugins=libmyplugins.so |
maybe cuz of typo. |
I'm trying to run the serialized yolov4 engine with trtexec, which comes included in the TensorRT NGC docker containers. But anyway: it basically loads the serialized engine and runs inference - not much different from what yolov4.cpp does.
docker run --gpus all -it --rm -v $(pwd)/tensorrtx:/tensorrtx nvcr.io/nvidia/tensorrt:19.10-py3
cd /workspace/tensorrt/bin
./trtexec --loadEngine=/tensorrtx/yolov4/build/yolov4.engine --verbose
This obviously fails because TensorRT does not load the plugin containing Mish Activation and Yolo Layer. So next I tried:
./trtexec --loadEngine=/tensorrtx/yolov4/build/yolov4.engine --plugins=/tensorrtx/yolov4/build/libmyplugins.so --verbose
So it loads the library containing the plugin but it does not seem to register the plugin correctly. I checked the same approach with a different tensorrt engine using custom layers and it worked. Is there any trick to loading your custom plugins @wang-xinyu ? Is selecting the correct
arch=compute_30;code=sm_30
in the CMakeList.txt important? Is it possible to run the engine in a "standardized" way outside of your custom loading code in yolov4.cpp?Any hint greatly appreciated! :)
Edit: I tried with different TensorRT versions, including the most recent 20.06 container which comes with 7.1.2
The text was updated successfully, but these errors were encountered: