onnxruntime
bb331b7a - Fix FuseInitializersTransformer consumer input lookup (#32426)

Commit
3 days ago
Fix FuseInitializersTransformer consumer input lookup (#32426) ## Description Fixes #32405. `FuseInitializersTransformer` locates the consumer input to replace by comparing the producer node name with consumer input value names. ONNX does not require node names and output value names to match. When they differ, the lookup can reach the end of `InputDefs()` and the following access can go out of bounds. The transformer now matches the consumer input against the Cast node's output value name and guards against an unexpected missing match. ## Tests Adds a regression test where the Cast node name differs from its output value name, matching the failure reported in #32405.
Parents
Loading