Accuracy mismatch between ONNX Runtime and TensorRT for SegVit
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 13.4k
- Forks
- 2.4k
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
Description
We observed a significant accuracy mismatch when converting an SegVit ONNX model to a TensorRT engine. The issue has been narrowed down using polygraphy debug reduce and appears to originate from normalization layers (InstanceNormalization / GroupNorm pattern).
The mismatch starts from very early layers in the model and propagates through the entire network, eventually causing large output deviations.
Environment
TensorRT version: 10.13.0.35
GPU: RTX 3080
CUDA version: 12.8
OS: Ubuntu 22.04
Steps To Reproduce
Run Polygraphy debug reduce:
polygraphy debug reduce vit_seg_simp.onnx --mode bisect --output reduced_model.onnx --check polygraphy run polygraphy_debug.onnx --onnxrt --trt
Observe accuracy mismatch between ONNX Runtime and TensorRT.
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the Polygraphy debug-reduce command from the issue with vit_seg_simp.onnx and polygraphy_debug.onnx, then inspect log.txt and the reduced_model.onnx result. Compare the normalization layers identified by the reduction across ONNX Runtime and TensorRT; the issue is done when the source of the accuracy mismatch is isolated and the discrepancy is resolved or clearly characterized.
Written by the indexing model from the issue text.
Assessment
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100