-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Labels
ep:oneDNNquestions/issues related to DNNL EPquestions/issues related to DNNL EP
Description
Describe the issue
Description:
When using the DNNL Execution Provider (EP) in ONNX Runtime, LayerNormalization nodes with the attribute axis=-1 produce incorrect results. Currently, DNNL does not resolve negative axes, which leads to wrong outputs.
Environment:
- ONNX Runtime version: 1.23.1
- Platform:(no CUDA, Intel + AMD Graphics)
- Models with LayerNormalization using axis=-1 (e.g., SAM2)
Expected behavior:
The negative axis should be correctly resolved before DNNL execution, or DNNL EP should handle negative axes to produce correct output.
Current workaround:
Exclude LayerNormalization nodes with axis=-1 when using DNNL EP.
Additional notes:
DNNL provides excellent performance, but this issue causes incorrect results if negative axes are not handled.
To reproduce
- Load a model containing LayerNormalization nodes with axis=-1.
- Run inference using the DNNL Execution Provider.
- Observe that the output differs from other (e.g., CPU)
Urgency
No response
Platform
Mac
OS Version
15.7.1
ONNX Runtime Installation
Built from Source
ONNX Runtime Version or Commit ID
1.23.1
ONNX Runtime API
C++
Architecture
X64
Execution Provider
oneDNN
Execution Provider Library Version
oneDNN-3.9.2
Metadata
Metadata
Assignees
Labels
ep:oneDNNquestions/issues related to DNNL EPquestions/issues related to DNNL EP