Commit 9ce61be
Address DML crashes in WebNN QDQ subgraph tests (#26822)
### Description
<!-- Describe your changes. -->
This change proposes a fix to some DML crashes observed in WebNN QDQ
subgraph tests. The root cause of the problem as analyzed in the issue
linked below is that the DML EP does not have kernels implemented for
the QLinear versions of LeakyRelu and Softmax. The QDQ transformer has
logic to fuse a 3-node sequence in the graph to the associated QLinear
custom op. There is an operator registry which contains the mapping
between EPs and the ops that the transformer consults for computing the
quantized variants.
The registry currently has the CPU and DML EPs supporting the same sets
of operators (thereby assuming that the fused node would also be
supported by the EP), so what I did was split out a separate
registration for the LeakyRelu and Softmax ops and associate them with
the CPU EP, while removing those ops from the prior list.
I was trying to also explore other options like seeing if I could
somehow check to see if the EP has a supported kernel for the op before
proceeding with the assignment- I could not figure out a way to do this,
though.
I validated this change by building a private version of ORT and running
the affected tests in Edge Canary. The crash did not occur for those
tests with the fix in place.
### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
This bug causes crashes in the web browser's GPU sandbox process, which
is a blocker for WebNN origin trials. The crashes need to be resolved.
Fixes #26531.
---------
Co-authored-by: Aditya Rastogi <adityar@ntdev.microsoft.com>1 parent 9f95908 commit 9ce61be
File tree
1 file changed
+16
-3
lines changed- onnxruntime/core/optimizer/qdq_transformer/selectors_actions
1 file changed
+16
-3
lines changedLines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
148 | 149 | | |
| 150 | + | |
149 | 151 | | |
150 | 152 | | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
155 | | - | |
156 | 158 | | |
157 | | - | |
158 | | - | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
161 | 173 | | |
162 | 174 | | |
| 175 | + | |
163 | 176 | | |
164 | 177 | | |
165 | 178 | | |
| |||
0 commit comments