From 9aed8fb43441228343b925b42464a55042c47ca0 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Wed, 17 Nov 2021 13:16:45 +0000 Subject: IVGCVSW-6040 Update 21.11 Doxygen Documents Signed-off-by: Nikhil Raj Change-Id: Ia36ec98c4bebc27a69103911ea3409cd7db587a5 --- 21.11/_insert_debug_layer_tests_8cpp.xhtml | 167 +++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 21.11/_insert_debug_layer_tests_8cpp.xhtml (limited to '21.11/_insert_debug_layer_tests_8cpp.xhtml') diff --git a/21.11/_insert_debug_layer_tests_8cpp.xhtml b/21.11/_insert_debug_layer_tests_8cpp.xhtml new file mode 100644 index 0000000000..2f8f34b8ce --- /dev/null +++ b/21.11/_insert_debug_layer_tests_8cpp.xhtml @@ -0,0 +1,167 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/test/optimizations/InsertDebugLayerTests.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.11 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
InsertDebugLayerTests.cpp File Reference
+
+
+
#include "../TestUtils.hpp"
+#include <Optimizer.hpp>
+#include <doctest/doctest.h>
+
+

Go to the source code of this file.

+ + + + +

+Functions

 TEST_SUITE ("Optimizer")
 
+

Function Documentation

+ +

◆ TEST_SUITE()

+ +
+
+ + + + + + + + +
TEST_SUITE ("Optimizer" )
+
+ +

Definition at line 12 of file InsertDebugLayerTests.cpp.

+ +

References Graph::AddLayer(), Graph::cbegin(), Graph::cend(), CheckSequence(), OutputSlot::Connect(), armnn::Float32, Layer::GetOutputSlot(), armnn::MakeOptimizations(), Optimizer::Pass(), and OutputSlot::SetTensorInfo().

+
13 {
14 using namespace armnn::optimizations;
15 
16 TEST_CASE("InsertDebugOptimizationTest")
17 {
18  armnn::Graph graph;
19 
20  const armnn::TensorInfo info({ 2, 2, 1, 3 }, armnn::DataType::Float32);
21 
22  // Create the simple test network
23  auto input = graph.AddLayer<armnn::InputLayer>(0, "input");
24  input->GetOutputSlot().SetTensorInfo(info);
25 
26  auto floor = graph.AddLayer<armnn::FloorLayer>("floor");
27  floor->GetOutputSlot().SetTensorInfo(info);
28 
29  auto output = graph.AddLayer<armnn::OutputLayer>(1, "output");
30 
31  // Connect up the layers
32  input->GetOutputSlot().Connect(floor->GetInputSlot(0));
33  floor->GetOutputSlot().Connect(output->GetInputSlot(0));
34 
35  CHECK(CheckSequence(graph.cbegin(), graph.cend(), &IsLayerOfType<armnn::InputLayer>,
36  &IsLayerOfType<armnn::FloorLayer>, &IsLayerOfType<armnn::OutputLayer>));
37 
38  // Run the optimizer
40 
41  CHECK(CheckSequence(graph.cbegin(), graph.cend(), &IsLayerOfType<armnn::InputLayer>,
42  &IsLayerOfType<armnn::DebugLayer>, &IsLayerOfType<armnn::FloorLayer>,
43  &IsLayerOfType<armnn::DebugLayer>, &IsLayerOfType<armnn::OutputLayer>));
44 }
45 
46 }
Optimizer::Optimizations MakeOptimizations(Args &&... args)
Definition: Optimizer.hpp:43
+ + +
LayerT * AddLayer(Args &&... args)
Adds a new layer, of type LayerType, to the graph constructed with the arguments passed.
Definition: Graph.hpp:417
+
ConstIterator cbegin() const
Returns const iterator pointing to the beginning of the list. Lowercase for range-based for loops...
Definition: Graph.hpp:175
+
int Connect(InputSlot &destination)
Definition: Layer.cpp:83
+
static void Pass(Graph &graph, const Optimizations &optimizations)
Definition: Optimizer.cpp:16
+
OptimizeForType< Layer, AddDebugImpl > InsertDebugLayer
Definition: AddDebug.hpp:34
+
A layer user-provided data can be bound to (e.g. inputs, outputs).
Definition: OutputLayer.hpp:13
+
This layer represents a floor operation.
Definition: FloorLayer.hpp:13
+ + +
A layer user-provided data can be bound to (e.g. inputs, outputs).
Definition: InputLayer.hpp:13
+
bool CheckSequence(const armnn::Graph::ConstIterator first, const armnn::Graph::ConstIterator last)
Definition: TestUtils.hpp:21
+
void SetTensorInfo(const TensorInfo &tensorInfo) override
Definition: Layer.cpp:58
+
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
Definition: Layer.hpp:318
+ +
ConstIterator cend() const
Returns const iterator pointing to the end of the list. Lowercase for range-based for loops...
Definition: Graph.hpp:177
+
+
+
+
+
+ + + + -- cgit v1.2.1