-
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
Tensorrt 8.6 GA : C++ Inference gives diffrence results compared to onnx || pt model python inference #3312
Comments
Looks like output between onnxruntime and TRT is good, Could you please check the diff between pytorch and onnxruntime?
|
python or onnx runtime reuslt is 512 output is correct Both output 512 float values, but there is a difference in the values. What to check ##In the case of cuda 11.6 and tensorrt 8.4.1.6, there are 512 output data from trt, but the values do not match the onnxruntime and python output data, so it was updated to tensorrt 8.6.1 and cuda 12.0. builder flag = fp32
|
Found the problem. Something went wrong in preprocessing. 224 224 This problem occurred because the padding value was entered when performing cudamemcpy on the image. thanks for your kind |
Cudamemcpy is migrating data from host to device, what is the specific cause of the error? And how to solve it? Can give some solutions |
Description
Hi there
i got a saved model converted to onnx in order to run inference using Tensorrt 8.6 c++ API.
The model is a virtual model from the openai clips model.
(https://clip-as-service.s3.us-east-2.amazonaws.com/models-436c69702d61732d53657276696365/onnx/ViT-B-32/visual.onnx)
checking the embedded value of the image in the model.
but output results are diffrence compared to python
infrence(pt or onnx runtime) to trt in tensorrt c++ api
I checked and found that python inference is correct and tensorrt c++ api is incorrect. (both fp32)
The next log is trtexec verbose log after onnx check. You can check it (
https://drive.google.com/file/d/1carAjQ_oP2xEkia48J0tNztQ5meukaqZ/view?usp=drive_link)
Environment
TensorRT Version:8.6.1GA
NVIDIA GPU:GTX3090
NVIDIA Driver Version:
CUDA Version:12.0
CUDNN Version:8.9.4.25
Operating System:
Python Version (if applicable):
Tensorflow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if so, version):
Relevant Files
model
(https://clip-as-service.s3.us-east-2.amazonaws.com/models-436c69702d61732d53657276696365/onnx/ViT-B-32/visual.onnx)
log
(https://drive.google.com/file/d/1carAjQ_oP2xEkia48J0tNztQ5meukaqZ/view?usp=drive_link)
Model link:
Steps To Reproduce
Commands or scripts:
Have you tried the latest release?:
Can this model run on other frameworks? For example run ONNX model with ONNXRuntime (
polygraphy run <model.onnx> --onnxrt
):The text was updated successfully, but these errors were encountered: