microsoft / microsoft/onnxruntime
ORT throws exception on Session Creation when ORT_ENABLE_ALL is set, but not ORT_ENABLE_LAYOUT (WindowsML)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 184
Description
Describe the issue
When I try to initialize the ORT session with all optimizations enabled and EP policy OrtExecutionProviderDevicePolicy_PREFER_CPU, I get the following exception:
"C:\__w\1\s\win-onnxruntime\onnxruntime\core\graph\graph_utils.cc:30 onnxruntime::graph_utils::GetIndexFromName itr != node_args.end() was false. Attempting to get index by a name which does not exist:InsertedPrecisionFreeCast_/lstm/layer_norms.0/Constant_output_0 for node: /lstm/layer_norms.0/Mul/SimplifiedLayerNormFusion/
For now, this is just using the CPU EP. I am currently working around this by setting ORT_ENABLE_LAYOUT instead of ORT_ENABLE_ALL.
Another interesting note, the model used if FP16 – this could be causing some issues.
To reproduce
This only reproduces with a private model. I would first try with a FP16 model to see if that's what's causing the issue. If not, then reach out to me and we can see if we can get a repro set up.
Urgency
No response
Platform
Windows
OS Version
24H2
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
23
ONNX Runtime API
WinML
Architecture
X64
Execution Provider
CPU
Execution Provider Library Version
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the failure reported in onnxruntime/core/graph/graph_utils.cc and attempt reproduction using an FP16 model with ORT_ENABLE_ALL, ORT_ENABLE_LAYOUT, and the CPU execution provider. Compare session creation under the two optimization settings and document or fix the missing node-argument lookup; completion requires a reproducible test or model and successful session creation with ORT_ENABLE_ALL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100