mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Fix invalid access in log call. (#8389)
Fix bug that shows up when running tests (in particular, GraphTransformationTests.ConcatSliceEliminationTest) with more verbose logging level. There is a log statement that doesn't get evaluated at the default test logging level (warning). It was accessing the first element of an empty vector. This change moves that log statement before the point where that vector is cleared.
This commit is contained in:
parent
0a1c00e8db
commit
88d1ffe9b8
1 changed files with 2 additions and 1 deletions
|
|
@ -30,7 +30,6 @@ Status ConcatSliceElimination::ApplyImpl(Graph& graph, bool& modified, int graph
|
|||
|
||||
if (ConcatSliceElimination::FuseConcatSliceSubgraph(concat, graph, logger)) {
|
||||
fused_count++;
|
||||
LOGS(logger, INFO) << "Fused concat node: " << concat.OutputDefs()[0]->Name();
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -244,6 +243,8 @@ bool ConcatSliceElimination::FuseConcatSliceSubgraph(Node& concat, Graph& graph,
|
|||
replace_cnt++;
|
||||
}
|
||||
if (replace_cnt == 3) {
|
||||
LOGS(logger, INFO) << "Fused concat node: " << concat.OutputDefs()[0]->Name();
|
||||
|
||||
//delete the slice nodes and concat node
|
||||
graph_utils::RemoveNodeOutputEdges(graph, concat);
|
||||
graph.RemoveNode(concat.Index());
|
||||
|
|
|
|||
Loading…
Reference in a new issue