Skip to content

Accuracy mismatch between ONNX Runtime and TensorRT for SegVit #4741

@Lemonononon

Description

@Lemonononon

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!

log.txt
onnx file

Metadata

Metadata

Assignees

No one assigned

    Labels

    Module:AccuracyOutput mismatch between TensorRT and other frameworksModule:ONNXIssues relating to ONNX usage and import

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions