-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
tensorRT9's python bindings don't work correctly #3741
Comments
You have TRT 8 installed in your system? did you add the TensorRT-9.3.0.1/lib to you LD_LIBRARY_PATH? |
no TRT8 is not installed in my docker image and yes TensorRT-9.3.0.1/lib is in my LD_LIBRARY_PATH |
Oh looks you are using onnxruntime's tensorrt provider, I guess the reason is onnxruntime only support TRT 8, so it try to find TRT 8 lib and report error. |
I think it's expected since TRT 9 is a limited release that didn't go public in our developer zone. P.S. we just release TRT 10 to public. |
closing since no activity for more than 3 weeks per our policy, thanks all! |
Description
tensorrt 9.2 and 9.3's python binding uses the wrong version of tensorrt libraries (version 8 instead of version 9).
Environment
TensorRT Version: 9.3 installed from pre-compiled binary
NVIDIA GPU: 3070
NVIDIA Driver Version: 545.23.08
CUDA Version: 12.2
CUDNN Version: 8.9.7.29
Operating System:
Python Version (if applicable): 3.8
Model link:
https://github.com/onnx/models/tree/main/validated/vision/classification/resnet
https://github.com/onnx/models/blob/main/validated/vision/classification/resnet/model/resnet18-v1-7.tar.gz
Steps To Reproduce
After downloading the precompiled tensorrt 9.3 found under branch release/9.3. I extracted the files and then installed the python bindings:
Using Resnet as example.
Afterwards I use the tensorRT backend via onnx:
The error I get:
2024-03-26 14:24:54.342734006 [E:onnxruntime:Default, provider_bridge_ort.cc:1534 TryGetProviderInfo_TensorRT] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1209 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_tensorrt.so with error: libnvinfer.so.8: cannot open shared object file: No such file or directory
Almost all the files under TensorRT-9.3.0.1/lib ends with .9; This indicates that these files are correctly built and correspond to version 9. However the pybind isn't configured correctly to use them.
I tried renaming the following files:
libnvinfer.so.9 -> libnvinfer.so.8
libnvinfer_plugin.so.9 -> libnvinfer_plugin.so.8
libnvonnxparser.so.9 -> libnvonnxparser.so.8
And this solved the problem!
Can you please fix the bindings for tensorRT9 and publish wheels to pypi ?
Commands or scripts:
Have you tried the latest release?:
Can this model run on other frameworks?
Yes this model loads without any problem with CUDA backend
("CUDAExecutionProvider", {}),
The text was updated successfully, but these errors were encountered: