20.02
|
#include <boost/test/unit_test.hpp>
#include <Graph.hpp>
#include <SubgraphView.hpp>
#include <SubgraphViewSelector.hpp>
#include <backendsCommon/CpuTensorHandle.hpp>
#include <fstream>
#include <map>
#include <queue>
#include <random>
#include <chrono>
Go to the source code of this file.
Functions | |
BOOST_AUTO_TEST_CASE (SingleInputSingleOutput) | |
BOOST_AUTO_TEST_CASE (SingleInputSingleOutputSubstituteGraph) | |
BOOST_AUTO_TEST_CASE (MultiInputSingleOutput) | |
BOOST_AUTO_TEST_CASE (SingleInputMultiOutput) | |
BOOST_AUTO_TEST_CASE (MultiInputMultiOutput) | |
BOOST_AUTO_TEST_CASE (EraseReplacedLayers) | |
BOOST_AUTO_TEST_CASE (SubgraphForEmptyGraph) | |
BOOST_AUTO_TEST_CASE (SubgraphForEntireGraph) | |
BOOST_AUTO_TEST_CASE (NoSubgraphsForNoMatch) | |
BOOST_AUTO_TEST_CASE (OneSubgraphsSelectedASingleMatch) | |
BOOST_AUTO_TEST_CASE (MultipleLayersSelectedInTheMiddle) | |
BOOST_AUTO_TEST_CASE (DisjointGraphs) | |
BOOST_AUTO_TEST_CASE (IslandInTheMiddle) | |
BOOST_AUTO_TEST_CASE (MultipleSimpleSubgraphs) | |
BOOST_AUTO_TEST_CASE (SimpleLinearTest) | |
BOOST_AUTO_TEST_CASE (ValidMerge) | |
BOOST_AUTO_TEST_CASE (PropagatedDependencies) | |
BOOST_AUTO_TEST_CASE (Random) | |
BOOST_AUTO_TEST_CASE (SingleSubgraph) | |
BOOST_AUTO_TEST_CASE (MultipleSubgraphs) | |
BOOST_AUTO_TEST_CASE (SubgraphCycles) | |
BOOST_AUTO_TEST_CASE | ( | SingleInputSingleOutput | ) |
Definition at line 134 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), OutputSlot::Connect(), CreateInputsFrom(), CreateOutputsFrom(), CreateSubgraphViewFrom(), IInputSlot::GetConnection(), IOutputSlot::GetConnection(), InputSlot::GetConnection(), OutputSlot::GetConnection(), Layer::GetInputSlot(), Layer::GetOutputSlot(), and Graph::SubstituteSubgraph().
BOOST_AUTO_TEST_CASE | ( | SingleInputSingleOutputSubstituteGraph | ) |
Definition at line 172 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), OutputSlot::Connect(), CreateInputsFrom(), CreateOutputsFrom(), CreateSubgraphViewFrom(), IInputSlot::GetConnection(), IOutputSlot::GetConnection(), InputSlot::GetConnection(), OutputSlot::GetConnection(), Layer::GetInputSlot(), Layer::GetOutputSlot(), and Graph::SubstituteSubgraph().
BOOST_AUTO_TEST_CASE | ( | MultiInputSingleOutput | ) |
Definition at line 215 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), OutputSlot::Connect(), CreateInputsFrom(), CreateOutputsFrom(), CreateSubgraphViewFrom(), IInputSlot::GetConnection(), IOutputSlot::GetConnection(), InputSlot::GetConnection(), OutputSlot::GetConnection(), Layer::GetInputSlot(), Layer::GetOutputSlot(), and Graph::SubstituteSubgraph().
BOOST_AUTO_TEST_CASE | ( | SingleInputMultiOutput | ) |
Definition at line 266 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), OutputSlot::Connect(), CreateInputsFrom(), CreateOutputsFrom(), CreateSubgraphViewFrom(), IInputSlot::GetConnection(), IOutputSlot::GetConnection(), InputSlot::GetConnection(), OutputSlot::GetConnection(), Layer::GetInputSlot(), Layer::GetOutputSlot(), and Graph::SubstituteSubgraph().
BOOST_AUTO_TEST_CASE | ( | MultiInputMultiOutput | ) |
Definition at line 315 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), OutputSlot::Connect(), CreateInputsFrom(), CreateOutputsFrom(), CreateSubgraphViewFrom(), IInputSlot::GetConnection(), IOutputSlot::GetConnection(), InputSlot::GetConnection(), OutputSlot::GetConnection(), Layer::GetInputSlot(), Layer::GetOutputSlot(), and Graph::SubstituteSubgraph().
BOOST_AUTO_TEST_CASE | ( | EraseReplacedLayers | ) |
Definition at line 368 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), BOOST_AUTO_TEST_SUITE(), BOOST_AUTO_TEST_SUITE_END(), BOOST_CHECK(), CreateSubgraphViewFrom(), and Graph::SubstituteSubgraph().
BOOST_AUTO_TEST_CASE | ( | SubgraphForEmptyGraph | ) |
Definition at line 413 of file SubgraphViewTests.cpp.
References SubgraphView::GetInputSlots(), SubgraphView::GetLayers(), and SubgraphView::GetOutputSlots().
BOOST_AUTO_TEST_CASE | ( | SubgraphForEntireGraph | ) |
Definition at line 423 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), Layer::GetInputSlot(), Graph::GetNumLayers(), and Graph::InsertNewLayer().
BOOST_AUTO_TEST_CASE | ( | NoSubgraphsForNoMatch | ) |
Definition at line 443 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), Graph::InsertNewLayer(), and SubgraphViewSelector::SelectSubgraphs().
BOOST_AUTO_TEST_CASE | ( | OneSubgraphsSelectedASingleMatch | ) |
Definition at line 456 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), CreateInputsFrom(), CreateOutputsFrom(), CreateSubgraphViewFrom(), Layer::GetNameStr(), Graph::InsertNewLayer(), and SubgraphViewSelector::SelectSubgraphs().
BOOST_AUTO_TEST_CASE | ( | MultipleLayersSelectedInTheMiddle | ) |
Definition at line 485 of file SubgraphViewTests.cpp.
References armnn::Activation, Graph::AddLayer(), CreateInputsFrom(), CreateOutputsFrom(), CreateSubgraphViewFrom(), Layer::GetInputSlot(), Layer::GetType(), Graph::InsertNewLayer(), and SubgraphViewSelector::SelectSubgraphs().
BOOST_AUTO_TEST_CASE | ( | DisjointGraphs | ) |
Definition at line 519 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), CreateSubgraphViewFrom(), Layer::GetInputSlot(), Graph::InsertNewLayer(), and SubgraphViewSelector::SelectSubgraphs().
BOOST_AUTO_TEST_CASE | ( | IslandInTheMiddle | ) |
Definition at line 566 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), OutputSlot::Connect(), CreateInputsFrom(), CreateOutputsFrom(), CreateSubgraphViewFrom(), Layer::GetInputSlot(), Layer::GetName(), Layer::GetOutputSlot(), Graph::InsertNewLayer(), and SubgraphViewSelector::SelectSubgraphs().
BOOST_AUTO_TEST_CASE | ( | MultipleSimpleSubgraphs | ) |
Definition at line 657 of file SubgraphViewTests.cpp.
References armnn::Activation, Graph::AddLayer(), CreateInputsFrom(), CreateOutputsFrom(), CreateSubgraphViewFrom(), Layer::GetInputSlot(), Layer::GetType(), Graph::InsertNewLayer(), and SubgraphViewSelector::SelectSubgraphs().
BOOST_AUTO_TEST_CASE | ( | SimpleLinearTest | ) |
Definition at line 732 of file SubgraphViewTests.cpp.
References armnn::Activation, armnn::Addition, Graph::AddLayer(), armnn::BOOST_AUTO_TEST_CASE(), BOOST_CHECK(), armnn::Concat, OutputSlot::Connect(), CreateInputsFrom(), CreateOutputsFrom(), CreateSubgraphViewFrom(), Layer::GetInputSlot(), Layer::GetOutputSlot(), Layer::GetType(), SubgraphViewSelector::SelectSubgraphs(), and armnn::Splitter.
BOOST_AUTO_TEST_CASE | ( | ValidMerge | ) |
Definition at line 953 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), OutputSlot::Connect(), CreateInputsFrom(), CreateOutputsFrom(), CreateSubgraphViewFrom(), Layer::GetInputSlot(), Layer::GetName(), Layer::GetOutputSlot(), and SubgraphViewSelector::SelectSubgraphs().
BOOST_AUTO_TEST_CASE | ( | PropagatedDependencies | ) |
Definition at line 1026 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), OutputSlot::Connect(), CreateInputsFrom(), CreateOutputsFrom(), CreateSubgraphViewFrom(), Layer::GetInputSlot(), Layer::GetName(), Layer::GetOutputSlot(), Graph::InsertNewLayer(), and SubgraphViewSelector::SelectSubgraphs().
BOOST_AUTO_TEST_CASE | ( | Random | ) |
Definition at line 1122 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), BOOST_AUTO_TEST_SUITE(), BOOST_AUTO_TEST_SUITE_END(), BOOST_CHECK(), OutputSlot::Connect(), armnn::Constant, armnn::debug, InputSlot::GetConnectedOutputSlot(), Layer::GetInputSlots(), Layer::GetName(), Layer::GetNumOutputSlots(), Layer::GetOutputSlot(), armnn::Input, SubgraphViewSelector::SelectSubgraphs(), and Graph::SerializeToDot().
BOOST_AUTO_TEST_CASE | ( | SingleSubgraph | ) |
Definition at line 1337 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), OutputSlot::Connect(), Layer::GetBackendId(), IInputSlot::GetConnection(), IOutputSlot::GetConnection(), InputSlot::GetConnection(), OutputSlot::GetConnection(), Layer::GetInputSlot(), Layer::GetOutputSlot(), armnn::GpuAcc, armnn::numeric_cast(), SubgraphViewSelector::SelectSubgraphs(), Layer::SetBackendId(), and Graph::SubstituteSubgraph().
BOOST_AUTO_TEST_CASE | ( | MultipleSubgraphs | ) |
Definition at line 1402 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), OutputSlot::Connect(), armnn::CpuAcc, Layer::GetBackendId(), IInputSlot::GetConnection(), IOutputSlot::GetConnection(), InputSlot::GetConnection(), OutputSlot::GetConnection(), Layer::GetInputSlot(), Layer::GetOutputSlot(), armnn::numeric_cast(), SubgraphViewSelector::SelectSubgraphs(), Layer::SetBackendId(), and Graph::SubstituteSubgraph().
BOOST_AUTO_TEST_CASE | ( | SubgraphCycles | ) |
Definition at line 1497 of file SubgraphViewTests.cpp.
References Graph::AddLayer(), BOOST_AUTO_TEST_SUITE_END(), OutputSlot::Connect(), CreateInputsFrom(), CreateOutputsFrom(), CreateSubgraphViewFrom(), Layer::GetInputSlot(), Layer::GetNameStr(), Layer::GetOutputSlot(), and SubgraphViewSelector::SelectSubgraphs().