microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
14.81k stars 2.94k forks source link

[Performance] Inconsistent Tensor Output with Optimizations Enabled/Disabled (Pad Fusion Issue) #22177

Open vinmazz opened 2 months ago

vinmazz commented 2 months ago

Describe the issue

The tensor output results of the same ONNX model with the same inputs vary depending on whether optimizations are enabled or disabled. The issue specifically involves the Pad Fusion optimizer, particularly in cases where there is a pad layer followed by an average pool layer.

To reproduce

  1. Load the ONNX model with optimizations enabled.
  2. Perform inference with a specific set of inputs.
  3. Load the same ONNX model with optimizations disabled.
  4. Perform inference with the same set of inputs.
  5. Compare the tensor output results.

Urgency

No response

Platform

Windows

OS Version

10.0.19045

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.19.2

ONNX Runtime API

Python

Architecture

X64

Execution Provider

Default CPU

Execution Provider Library Version

No response

Model File

Pad_AveragePool_ONNX_model.zip

Is this a quantized model?

No

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.