mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Use node name to uniquify the subgraph nodes. (#15855)
### Description <!-- Describe your changes. --> Use the unique name of the function node name to uniquify the subgraph node names. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? Prevent duplicate node names in the graph. - If it fixes an open issue, please link to the issue here. --> https://github.com/microsoft/onnxruntime/issues/15849 --------- Co-authored-by: Satya Jandhyala <sajandhy@microsoft.com>
This commit is contained in:
parent
4dc4470cc7
commit
22a578c06c
1 changed files with 2 additions and 3 deletions
|
|
@ -4017,9 +4017,8 @@ Status Graph::InlineFunction(Node& callnode) {
|
|||
// create a uniq_identifier to append to every node name and intermediate input\outputs
|
||||
// to make sure there are no unintended duplicates
|
||||
std::stringstream ss;
|
||||
ss << "_" << static_cast<const void*>(&callnode) << "_";
|
||||
auto uniq_identifier = ss.str();
|
||||
|
||||
ss << "_inline_" << callnode.OpType();
|
||||
auto uniq_identifier = GenerateNodeName(ss.str());
|
||||
// Replace a (function-call) node by an inlined graph.
|
||||
if (!callnode.GetFunctionBody()) {
|
||||
// This is the normal use-case: inlining a FunctionProto (representing
|
||||
|
|
|
|||
Loading…
Reference in a new issue