From 7bfd38a721360183f3392f9ab35db18a0dd7fef8 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Fri, 19 Aug 2022 15:23:36 +0100 Subject: Update Doxygen for 22.08 Release Signed-off-by: Nikhil Raj Change-Id: I4789fe868e0492839be1482e5cee3642ed90d756 --- 22.08/_optimize_inverse_permutes_tests_8cpp.xhtml | 166 ++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 22.08/_optimize_inverse_permutes_tests_8cpp.xhtml (limited to '22.08/_optimize_inverse_permutes_tests_8cpp.xhtml') diff --git a/22.08/_optimize_inverse_permutes_tests_8cpp.xhtml b/22.08/_optimize_inverse_permutes_tests_8cpp.xhtml new file mode 100644 index 0000000000..f7c7b88bed --- /dev/null +++ b/22.08/_optimize_inverse_permutes_tests_8cpp.xhtml @@ -0,0 +1,166 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/test/optimizations/OptimizeInversePermutesTests.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  22.08 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
OptimizeInversePermutesTests.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 14 of file OptimizeInversePermutesTests.cpp.

+ +

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

+
15 {
16 using namespace armnn::optimizations;
17 
18 TEST_CASE("OptimizeInversePermutesTest")
19 {
20  armnn::Graph graph;
21 
22  auto output = graph.AddLayer<armnn::OutputLayer>(0, "output");
23 
24  graph.InsertNewLayer<armnn::InputLayer>(output->GetInputSlot(0), 0, "input");
25 
26  // Inserts two permutes, one the inverse of the other.
27  graph.InsertNewLayer<armnn::PermuteLayer>(output->GetInputSlot(0), armnn::PermuteDescriptor({ 0, 2, 3, 1 }),
28  "perm0231");
29  graph.InsertNewLayer<armnn::PermuteLayer>(output->GetInputSlot(0), armnn::PermuteDescriptor({ 0, 3, 1, 2 }),
30  "perm0312");
31 
32  CHECK(CheckSequence(graph.cbegin(), graph.cend(), &IsLayerOfType<armnn::InputLayer>,
33  &IsLayerOfType<armnn::PermuteLayer>, &IsLayerOfType<armnn::PermuteLayer>,
34  &IsLayerOfType<armnn::OutputLayer>));
35 
37 
38  // The permutes are removed.
39  CHECK(CheckSequence(graph.cbegin(), graph.cend(), &IsLayerOfType<armnn::InputLayer>,
40  &IsLayerOfType<armnn::OutputLayer>));
41 }
42 
43 TEST_CASE("OptimizeInverseTransposesTest")
44 {
45  armnn::Graph graph;
46 
47  auto output = graph.AddLayer<armnn::OutputLayer>(0, "output");
48 
49  graph.InsertNewLayer<armnn::InputLayer>(output->GetInputSlot(0), 0, "input");
50 
51  // Inserts two permutes, one the inverse of the other.
52  graph.InsertNewLayer<armnn::TransposeLayer>(output->GetInputSlot(0),
53  armnn::TransposeDescriptor({ 0, 3, 1, 2 }),
54  "transpose0312");
55  graph.InsertNewLayer<armnn::TransposeLayer>(output->GetInputSlot(0),
56  armnn::TransposeDescriptor({ 0, 2, 3, 1 }),
57  "transpose0231");
58 
59  CHECK(CheckSequence(graph.cbegin(), graph.cend(), &IsLayerOfType<armnn::InputLayer>,
60  &IsLayerOfType<armnn::TransposeLayer>, &IsLayerOfType<armnn::TransposeLayer>,
61  &IsLayerOfType<armnn::OutputLayer>));
62 
64 
65  // The permutes are removed.
66  CHECK(CheckSequence(graph.cbegin(), graph.cend(), &IsLayerOfType<armnn::InputLayer>,
67  &IsLayerOfType<armnn::OutputLayer>));
68 }
69 
70 }
OptimizeForConnection< PermuteLayer, PermuteLayer, OptimizeInversePermutesImpl< PermuteLayer > > OptimizeInversePermutes
+
Optimizer::Optimizations MakeOptimizations(Args &&... args)
Definition: Optimizer.hpp:43
+
bool CheckSequence(const armnn::Graph::ConstIterator first, const armnn::Graph::ConstIterator last)
Definition: TestUtils.hpp:21
+
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:456
+
ConstIterator cbegin() const
Returns const iterator pointing to the beginning of the list. Lowercase for range-based for loops...
Definition: Graph.hpp:179
+
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
+ +
This layer represents a transpose operation.
+
A layer user-provided data can be bound to (e.g. inputs, outputs).
Definition: InputLayer.hpp:13
+
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:181
+
LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)
Inserts a new layer between the output slot currently connected to insertBefore and insertBefore itse...
Definition: Graph.hpp:471
+
A PermuteDescriptor for the PermuteLayer.
+
+
+
+
+
+ + + + -- cgit v1.2.1