Skip to content

Commit eb7fa32

Browse files
Copilotjustinchuby
andcommitted
Fix compilation error in ToProto call
Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
1 parent 61aff5c commit eb7fa32

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

onnxruntime/test/ir/graph_test.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2292,7 +2292,9 @@ TEST(GraphTest, OuterScopeInitializerTypeInference) {
22922292

22932293
// Set the subgraph as an attribute of the parent node
22942294
subgraph_proto.set_name("then_branch");
2295-
*(subgraph_proto.add_node()) = sub_node.ToProto();
2295+
NodeProto node_proto;
2296+
sub_node.ToProto(node_proto);
2297+
*(subgraph_proto.add_node()) = std::move(node_proto);
22962298
subgraph_proto.add_output()->set_name("subgraph_out");
22972299

22982300
parent_node.AddAttribute("then_branch", subgraph_proto);

0 commit comments

Comments
 (0)