#32673·onnxruntime

TensorRT EP produces incorrect results with CUDA I/O Binding when input is populated asynchronously without an explicit stream dependency

Author: yugure5474Created Sep 17, 2026Updated Sep 17, 2026
Labelsep:CUDAep:TensorRT
### Describe the issue

We found a reproducible correctness issue when using ONNX Runtime TensorRT EP with CUDA I/O Binding.

The TensorRT engine itself is correct. The issue occurs when a CUDA-bound input buffer is populated asynchronously by external CUDA work and TensorRT EP consumes that buffer without an explicit CUDA stream happens-before relationship.

The same model and input produce correct results through:

  • ORT CPU

  • ORT CUDA

  • native TensorRT 10.13.3.9

  • an ORT-generated TensorRT engine executed directly with trtexec

  • ORT TensorRT EP with host input

  • ORT TensorRT EP with CUDA device input after explicit synchronization

The incorrect results occur only when the CUDA input buffer is populated asynchronously and inference starts without explicitly synchronizing the producer CUDA stream.

We initially suspected the D-FINE model, TF32, GridSample/deformable attention, TensorRT graph compilation, and TensorRT engine generation. Those possibilities were isolated and excluded.

Using the public D-FINE-M ONNX artifact from dfine-cpp v0.5.0, we observed the following over 32 images / 1,600 Top-50 detections:

Execution path | Result -- | -- ORT CPU | 1,600 / 1,600 with IoU >= 0.99 ORT CUDA | 1,600 / 1,600 with IoU >= 0.99 Native TensorRT 10.13.3.9, FP32, no TF32 | 1,600 / 1,600 ORT-generated TensorRT cache engine executed with trtexec | 1,600 / 1,600 ORT TensorRT EP with host input | 1,600 / 1,600 ORT TensorRT EP with unsynchronized async CUDA input | incorrect Same CUDA input with explicit stream synchronization | 1,600 / 1,600

For native TensorRT:

  • Minimum IoU: 0.999568

  • Mean IoU: 0.999995

For the final device-resident path after explicit synchronization:

  • 1,600 / 1,600 matching detections