microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
14.59k stars 2.92k forks source link

Fusion Reshape bug whith multiple graphs in a model #10477

Open romain-keramitas-prl opened 2 years ago

romain-keramitas-prl commented 2 years ago

Describe the bug

In the transformers optimization tool, the Reshape node fusion has a bug: the node created here has no name attached to it, so below the node_name_to_graph_name maps an empty string to a graph. If there are multiple graphs, this is a source of error, as the nodes are added to the last graph where the fusion could be applied.

Urgency

Low, the fix is however pretty straightforward. I have not checked whether this also applied to other fusions.

System information

To Reproduce

Expected behavior The fusion should work on models with multiple graphs.

zhanghuanrong commented 2 years ago

Thanks for reporting this bug. We will investigate and fix it.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs. If further support is needed, please provide an update and/or more details.