mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-23 22:13:38 +00:00
Fix SDL warning (#6390)
This commit is contained in:
parent
d7bdd96425
commit
a1b5bfc4f8
1 changed files with 17 additions and 10 deletions
|
|
@ -222,22 +222,29 @@ TEST(CseTests, Subgraph) {
|
|||
}
|
||||
}
|
||||
|
||||
// Assert that we were able to obtain subgraphs pertaining to the then/else attributes in the 'If' node
|
||||
ASSERT_NE(if_true_graph, nullptr);
|
||||
ASSERT_NE(if_false_graph, nullptr);
|
||||
|
||||
output_names = GetSortedNames(if_true_graph->GetOutputs());
|
||||
ASSERT_EQ(output_names, (std::vector<std::string>{"Result1", "Result2", "Result3"}));
|
||||
// Keep VC++ static analyzer happy
|
||||
if (if_true_graph) {
|
||||
output_names = GetSortedNames(if_true_graph->GetOutputs());
|
||||
ASSERT_EQ(output_names, (std::vector<std::string>{"Result1", "Result2", "Result3"}));
|
||||
|
||||
auto op_count = CountOpsInGraph(*if_true_graph);
|
||||
ASSERT_EQ(op_count["Mul"], 1);
|
||||
ASSERT_EQ(op_count["Sum"], 3);
|
||||
auto op_count = CountOpsInGraph(*if_true_graph);
|
||||
ASSERT_EQ(op_count["Mul"], 1);
|
||||
ASSERT_EQ(op_count["Sum"], 3);
|
||||
}
|
||||
|
||||
output_names = GetSortedNames(if_false_graph->GetOutputs());
|
||||
ASSERT_EQ(output_names, (std::vector<std::string>{"Result1", "Result2", "Result3"}));
|
||||
// Keep VC++ static analyzer happy
|
||||
if (if_false_graph) {
|
||||
output_names = GetSortedNames(if_false_graph->GetOutputs());
|
||||
ASSERT_EQ(output_names, (std::vector<std::string>{"Result1", "Result2", "Result3"}));
|
||||
|
||||
op_count = CountOpsInGraph(*if_false_graph);
|
||||
ASSERT_EQ(op_count["Mul"], 3);
|
||||
ASSERT_EQ(op_count["Sum"], 1);
|
||||
auto op_count = CountOpsInGraph(*if_false_graph);
|
||||
ASSERT_EQ(op_count["Mul"], 3);
|
||||
ASSERT_EQ(op_count["Sum"], 1);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(CseTests, MergedValueAndGraphOutputAreOutputsOfSameNode) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue