-
Notifications
You must be signed in to change notification settings - Fork 646
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
[Bug] Manually building RTMDet-Inst tensorRT engine fails with internal error #2236
Comments
@mattiasbax hi, how did you get the onnx file? Could you provide a sample code? |
Hi @RunningLeon , The onnx file was acquired by the provided deploy.py script, i.e:
The onnx file has been loaded into a python script using onnxruntime and executed inference on both image and video data successfully. |
@mattiasbax mmdeploy provides |
@RunningLeon So is there is a difference in the provided .onnx file if I run deploy.py with "instance-seg_tensorrt_static-800x1344.py" and "instance-seg_rtmdet-ins_onnxruntime_static-640x640"? The .engine file I received from running deploy.py with tensorrt_static_xyz.py was not compatible with my tensorRT version, which is why I wanted to build the engine file myself. |
Yes, the onnx files are different. I just tested OK on torch1.10.0+trt8.4.1.5+cuda11.3. |
@RunningLeon I see, thanks. I just tried with the above script using the other .onnx file provided from using tensorrt_static_xyz.py file. I got these errors:
I guess I'm missing some details on how to import the plugins correctly I guess |
hi, pls. rebuild mmdeploy with tensorrt or use docker image https://mmdeploy.readthedocs.io/en/latest/01-how-to-build/build_from_docker.html#use-docker-image |
@RunningLeon Ok, I will try to rebuild mmdeploy. Do I have to build it with tensorRT 8.2.3 or can I build it with later versions? |
Hi @RunningLeon , I rebuilt my mmdeploy in accordance to (https://mmdeploy.readthedocs.io/en/latest/01-how-to-build/windows.html) and successfully built the mmdeploy_tensorrt_ops.dll. I still get the above errors:
How do I use the mmdeploy_tensorrt_ops so that my application can find the operations? |
hi, you could try add the dll to |
@RunningLeon I already did that, without any success unfortunately. I even tried moving it directly to the tensorrt lib folder (which is in path env). Is there anything else I need from the built custom ops? I did not build the SDKs, only the TensorRT custom ops |
hi, pls. check cuda lib cudnn lib tensorrt lib and add them all to the path |
@RunningLeon They are all correctly in the path. Finding cuda, cudnn or tensorrt is not the problem it seems. It seems that it is not loading the DLL that contains the custom ops for the RTMDet-inst model. Should I try bumping to a later TensorRT version so that I can use load library (https://docs.nvidia.com/deeplearning/tensorrt/api/python_api/infer/Plugin/IPluginRegistry.html#tensorrt.IPluginRegistry.load_library) to specify the path to the mmdeploy_tesonrrt_ops.dll? |
Could you maybe send me your built mmdeploy_tesonrrt_ops.dll so I can test if it's the plugin or the environment that is faulty on my end? |
This issue is marked as stale because it has been marked as invalid or awaiting response for 7 days without any further response. It will be closed in 5 days if the stale label is not removed or if there is no further response. |
This issue is closed because it has been stale for 5 days. Please open a new issue if you have similar issues or you have any new updates now. |
I'm experiencing the same error, looking forward to a solution! |
same for me : in my case the inference with python passes but with C++ I am getting the same error |
|
I have the same issue when I try to generate TensorRT engine file. I have used the tensorrt deploy config as suggested in the comment above : #2236 (comment)
I also have the latest mmdeploy version that includes PR #2343, as suggested by @RunningLeon . |
Checklist
Describe the bug
I want to parse the RTMDet-Inst model and build the serialized model from .onnx file representation in order to control which tensorRT version is being used (and not necessarily 8.2 which is default for mmdeploy)
When I try to load the RTMDet-Inst end2end.onnx model created using mmdeploy into a tensorRT python script to build the engine I get the following error:
[TRT] [E] 4: [graphShapeAnalyzer.cpp::nvinfer1::builder::`anonymous-namespace'::ShapeAnalyzerImpl::processCheck::862] Error Code 4: Internal Error (/TopK: K exceeds the maximum value allowed (3840).)
Reproduction
Environment
Error traceback
[TRT] [E] 4: [graphShapeAnalyzer.cpp::nvinfer1::builder::`anonymous-namespace'::ShapeAnalyzerImpl::processCheck::862] Error Code 4: Internal Error (/TopK: K exceeds the maximum value allowed (3840).)
The text was updated successfully, but these errors were encountered: