From 6f2dd10d5278a85f85e552b37b3b469ab198d31b Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Mon, 6 Feb 2023 15:36:42 -0800 Subject: [PATCH] IdentityBuilder should add Delimit for each input (#14592) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …("####") should append for each input_def, not only on the last one else branch of this if should return ignore_identity https://github.com/microsoft/onnxruntime/blob/3d7518762ace6929be98e1203174c2dbf1ac094e/onnxruntime/core/optimizer/identical_children_consolidation.cc#L66 identity.append("####") should append for each input_def, not only on the last one ### Description ### Motivation and Context --- .../core/optimizer/identical_children_consolidation.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/onnxruntime/core/optimizer/identical_children_consolidation.cc b/onnxruntime/core/optimizer/identical_children_consolidation.cc index 17f01cebcd..07dc25dabd 100644 --- a/onnxruntime/core/optimizer/identical_children_consolidation.cc +++ b/onnxruntime/core/optimizer/identical_children_consolidation.cc @@ -117,8 +117,11 @@ string_view IdenticalChildrenConsolidation::IdentityBuilder(const Graph& graph, } else { identity.append(name); } + } else { + return ignore_identity; } + identity.append("####"); } - return {identity.append("####")}; + return {identity}; } } // namespace onnxruntime \ No newline at end of file