-
Notifications
You must be signed in to change notification settings - Fork 1
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
Runtime Exception Error #27
Comments
Hey there @Masrur02! Ah interesting - I just ran on my setup with CUDA 12.4 and TensorRT 10.0.1.6, onnxruntime-gpu 1.18.1 wihtout any issues. Can you tell a bit more about your setup? Hardware accelerator, TensorRT, onnxruntime version, operating system etc I'm working on a version that leverages torch.compile's tensorrt backend now too so fingers that combined with the tensorrt model optimizer library will get us some extended ops support! |
Hi,
|
The interesting issue is if I use trt=False to avoid the tensorrt execution provider then the code works. However, if I use trt=True, then there is this error. |
Did you specify any shape while converting the onnx model? Or do you use any specific shape while running the inference using tensorrt execution provider? |
Hey there @Masrur02! That is an odd result indeed - I wonder the BERT separte ([SEP]) token is ending up at the predixtion visualisation too. I'm seeing if I can reproduce now but to respond to your first couple of questions - forsure, as I was discussing over at the original repo, performance takes a bit of a hit with the TensorRT execution provider backend for onnxruntime due to some unsupported ops. I'm working on two things right now - pulling out BERT as it has full support for conversion, evaluating whether or not torch_tensorrt with the new Tensorrt model optimizer will make a difference. My questions for you are - Are you running this code here ? Have you made any modifications? Are those latency benchmarks in seconds? |
It's worth noting that I ran into problems with |
Hey so here's a shared colab notebook so we're meeting in a middle - inference quality looks good but the speed with a T4 over my RTX 3080 leaves much to be desired https://colab.research.google.com/drive/1Km1FzY1aeezu1G8GKNU1PZDeWmqvyUAO?usp=sharing I'll debug the trt setup in colab shortly to check if we can reproduce that crazy inference |
Yes, I am running it here. However, I have modified the gdino.model.py to read the model weight from a local directory. As I had to convert your onnx model to an inferred_onnx model by using this |
Aha! I've managed to reproduce the shape inference issue you where originally receiving - My last update I accidentally sent up the raw conversion before running it through onnx simplifier - ran a before and after, and that resolves it, you shouldn't need to run it through the symbolic shape inference tool, it'll just be plug and play. I'm sending up the working version now and a quick pr with the DL link - once that's done I'll give you a shout and let's see if that works out for you! Thank you for the catch! |
Excellent. Please send me once you are done. it will be really helpful for me. |
You've got it |
Where? Should I download it from your repo? |
A bunch of pytests are just running on merge right now, once it's merged successfully just head to Just noting once again that conversion isn't perfect with unsupported ops right now - I have a bunch of projects to complete right now but I'm eager to get back to it. I'll have a mixed precision fallback built inn with the torch model soon, and I'm hoping we can get the whole way with all the latest updates available to us |
Alright merged to main and all yours @Masrur02 - checking for reproducability from scratch now |
Cool, successful from scratch with correct inference - python packages are: tensorrt==10.1.0 In a Python 3.10 virtual env |
Hi, INFO:root:Available providers for ONNXRuntime: However, if I comment out trt_engine_hw_compatible, then the code is working well. Now I do not need to infer the shape. Thank you so much. Let me check the FPS now. |
Ah good to know! Looks like deprecation between versions huh |
Yes probably. Anyways you have really done a great job. |
Ah I appreciate the kind word and wish luck for now! I'm closing this issue for now but feel free of course to open more and I'll be there as soon as I can. Have a good weekend! |
Hi,
This is my code. This code is the modified version of https://github.com/IDEA-Research/Grounded-SAM-2/blob/main/grounded_sam2_local_demo.py Do you have any suggestions or ideas on this issue? TIA |
Hi,
I ran the grounding DINO inference code. And I am getting this error:
How can I solve this issue? TIA
The text was updated successfully, but these errors were encountered: