From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- 21.02/_optimize_inverse_permutes_tests_8cpp.xhtml | 199 ++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 21.02/_optimize_inverse_permutes_tests_8cpp.xhtml (limited to '21.02/_optimize_inverse_permutes_tests_8cpp.xhtml') diff --git a/21.02/_optimize_inverse_permutes_tests_8cpp.xhtml b/21.02/_optimize_inverse_permutes_tests_8cpp.xhtml new file mode 100644 index 0000000000..00b5ba6733 --- /dev/null +++ b/21.02/_optimize_inverse_permutes_tests_8cpp.xhtml @@ -0,0 +1,199 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/test/optimizations/OptimizeInversePermutesTests.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
OptimizeInversePermutesTests.cpp File Reference
+
+
+
#include "../TestUtils.hpp"
+#include <Optimizer.hpp>
+#include <boost/test/unit_test.hpp>
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

 BOOST_AUTO_TEST_CASE (OptimizeInversePermutesTest)
 
 BOOST_AUTO_TEST_CASE (OptimizeInverseTransposesTest)
 
+

Function Documentation

+ +

◆ BOOST_AUTO_TEST_CASE() [1/2]

+ +
+
+ + + + + + + + +
BOOST_AUTO_TEST_CASE (OptimizeInversePermutesTest )
+
+ +

Definition at line 17 of file OptimizeInversePermutesTests.cpp.

+ +

References Graph::AddLayer(), Graph::cbegin(), Graph::cend(), CheckSequence(), Graph::InsertNewLayer(), armnn::MakeOptimizations(), and Optimizer::Pass().

+
18 {
19  armnn::Graph graph;
20 
21  auto output = graph.AddLayer<armnn::OutputLayer>(0, "output");
22 
23  graph.InsertNewLayer<armnn::InputLayer>(output->GetInputSlot(0), 0, "input");
24 
25  // Inserts two permutes, one the inverse of the other.
26  graph.InsertNewLayer<armnn::PermuteLayer>(output->GetInputSlot(0), armnn::PermuteDescriptor({ 0, 2, 3, 1 }),
27  "perm0231");
28  graph.InsertNewLayer<armnn::PermuteLayer>(output->GetInputSlot(0), armnn::PermuteDescriptor({ 0, 3, 1, 2 }),
29  "perm0312");
30 
31  BOOST_TEST(CheckSequence(graph.cbegin(), graph.cend(), &IsLayerOfType<armnn::InputLayer>,
32  &IsLayerOfType<armnn::PermuteLayer>, &IsLayerOfType<armnn::PermuteLayer>,
33  &IsLayerOfType<armnn::OutputLayer>));
34 
36 
37  // The permutes are removed.
38  BOOST_TEST(CheckSequence(graph.cbegin(), graph.cend(), &IsLayerOfType<armnn::InputLayer>,
39  &IsLayerOfType<armnn::OutputLayer>));
40 }
OptimizeForConnection< PermuteLayer, PermuteLayer, OptimizeInversePermutesImpl< PermuteLayer > > OptimizeInversePermutes
+
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:402
+
ConstIterator cbegin() const
Returns const iterator pointing to the beginning of the list. Lowercase for range-based for loops...
Definition: Graph.hpp:172
+
static void Pass(Graph &graph, const Optimizations &optimizations)
Definition: Optimizer.cpp:16
+
This layer represents a permutation operation.
+
A layer user-provided data can be bound to (e.g. inputs, outputs).
Definition: OutputLayer.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
+
ConstIterator cend() const
Returns const iterator pointing to the end of the list. Lowercase for range-based for loops...
Definition: Graph.hpp:174
+
LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)
Inserts a new layer between the output slot currently connected to insertBefore and insertBefore itse...
Definition: Graph.hpp:416
+
A PermuteDescriptor for the PermuteLayer.
+
+
+
+ +

◆ BOOST_AUTO_TEST_CASE() [2/2]

+ +
+
+ + + + + + + + +
BOOST_AUTO_TEST_CASE (OptimizeInverseTransposesTest )
+
+ +

Definition at line 42 of file OptimizeInversePermutesTests.cpp.

+ +

References Graph::AddLayer(), BOOST_AUTO_TEST_SUITE_END(), Graph::cbegin(), Graph::cend(), CheckSequence(), Graph::InsertNewLayer(), armnn::MakeOptimizations(), and Optimizer::Pass().

+
43 {
44  armnn::Graph graph;
45 
46  auto output = graph.AddLayer<armnn::OutputLayer>(0, "output");
47 
48  graph.InsertNewLayer<armnn::InputLayer>(output->GetInputSlot(0), 0, "input");
49 
50  // Inserts two permutes, one the inverse of the other.
51  graph.InsertNewLayer<armnn::TransposeLayer>(output->GetInputSlot(0),
52  armnn::TransposeDescriptor({ 0, 3, 1, 2 }),
53  "transpose0312");
54  graph.InsertNewLayer<armnn::TransposeLayer>(output->GetInputSlot(0),
55  armnn::TransposeDescriptor({ 0, 2, 3, 1 }),
56  "transpose0231");
57 
58  BOOST_TEST(CheckSequence(graph.cbegin(), graph.cend(), &IsLayerOfType<armnn::InputLayer>,
59  &IsLayerOfType<armnn::TransposeLayer>, &IsLayerOfType<armnn::TransposeLayer>,
60  &IsLayerOfType<armnn::OutputLayer>));
61 
63 
64  // The permutes are removed.
65  BOOST_TEST(CheckSequence(graph.cbegin(), graph.cend(), &IsLayerOfType<armnn::InputLayer>,
66  &IsLayerOfType<armnn::OutputLayer>));
67 }
Optimizer::Optimizations MakeOptimizations(Args &&... args)
Definition: Optimizer.hpp:43
+
OptimizeForConnection< TransposeLayer, TransposeLayer, OptimizeInversePermutesImpl< TransposeLayer > > OptimizeInverseTransposes
+
LayerT * AddLayer(Args &&... args)
Adds a new layer, of type LayerType, to the graph constructed with the arguments passed.
Definition: Graph.hpp:402
+
ConstIterator cbegin() const
Returns const iterator pointing to the beginning of the list. Lowercase for range-based for loops...
Definition: Graph.hpp:172
+
static void Pass(Graph &graph, const Optimizations &optimizations)
Definition: Optimizer.cpp:16
+
A layer user-provided data can be bound to (e.g. inputs, outputs).
Definition: OutputLayer.hpp:13
+ +
This layer represents a transpose operation.
+
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
+
A TransposeDescriptor for the TransposeLayer.
+
ConstIterator cend() const
Returns const iterator pointing to the end of the list. Lowercase for range-based for loops...
Definition: Graph.hpp:174
+
LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)
Inserts a new layer between the output slot currently connected to insertBefore and insertBefore itse...
Definition: Graph.hpp:416
+
+
+
+
+
+ + + + -- cgit v1.2.1