onnxruntime/onnxruntime
Peishen Yan a05203b91c
[WebNN EP] Fix AddInitializersToSkip issues (#23354)
### Description
<!-- Describe your changes. -->
When the onnx model reuses initializers in more than one ops, if one of
the ops wants to add this initializer to the skipped list, but the other
ops still need this initializer, it will cause the process to crash.

Therefore, like other EPs, we count `initializer_usage_`, the number of
occurrences of each initializer in all ops and modify the
`AddInitializersToSkip` to minus the corresponding initializers'
statistic one when adding the specific operators.

### 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. -->
2025-01-17 17:18:38 -08:00
..
contrib_ops [WebGPU] allow build WebGPU EP for WebAssembly (#23364) 2025-01-16 10:52:17 -08:00
core [WebNN EP] Fix AddInitializersToSkip issues (#23354) 2025-01-17 17:18:38 -08:00
lora
python Enable comprehension simplification in ruff rules (#23414) 2025-01-17 08:43:06 -08:00
test [QNN EP] Fix regression for MatMul with two quantized/dynamic uint16 inputs (#23419) 2025-01-17 15:45:49 -08:00
tool/etw
wasm [WebNN] Fixed WebNN Module undefined issue (#22795) 2024-11-11 21:31:24 -08:00
__init__.py Use ruff as the formatter to replace black-isort (#23397) 2025-01-16 11:14:15 -08:00
ReformatSource.ps1
ReformatSourcePython.bat
VSCodeCoverage.runsettings