mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-17 21:10:43 +00:00
Fix initializer counts when used as graph output (#7260)
Signed-off-by: Tom Wildenhain <tomwi@microsoft.com>
This commit is contained in:
parent
2ec452cdad
commit
8219518aa8
1 changed files with 6 additions and 0 deletions
|
|
@ -928,6 +928,12 @@ static void ComputeConstantInitializerUseCount(const Graph& graph, std::unordere
|
|||
}
|
||||
}
|
||||
}
|
||||
// Initializers can be used as graph outputs
|
||||
for (const auto* arg : graph.GetOutputs()) {
|
||||
if (arg->Exists() && graph.GetConstantInitializer(arg->Name(), true /*check_outer_scope*/)) {
|
||||
constant_initializers_use_count[arg->Name()]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Status SessionState::FinalizeSessionState(const std::basic_string<PATH_CHAR_TYPE>& graph_location,
|
||||
|
|
|
|||
Loading…
Reference in a new issue