mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-18 21:21:17 +00:00
Fix reporting of unused initializers in subgraphs (#19341)
### Description <!-- Describe your changes. --> Increment num_resolves_ inside the graph resolve finalization function so the subgraphs have the same value. This prevents incorrect output regarding removing unused initializers. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> #19141
This commit is contained in:
parent
55b60d8fe0
commit
68b6064be6
1 changed files with 3 additions and 2 deletions
|
|
@ -2798,12 +2798,13 @@ Status Graph::Resolve(const ResolveOptions& options) {
|
|||
graph.GraphProtoSyncNeeded(false);
|
||||
}
|
||||
|
||||
// set num_resolves_ here so the graph and any subgraphs all have the same value
|
||||
++graph.num_resolves_;
|
||||
|
||||
return Status::OK(); };
|
||||
|
||||
ORT_RETURN_IF_ERROR(ForThisAndAllSubgraphs(all_subgraphs, finalize_func));
|
||||
|
||||
++num_resolves_;
|
||||
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue