From f86be93b7492b381370cae7bf71eca8572a0cbae Mon Sep 17 00:00:00 2001 From: Matthew Sloyan Date: Tue, 24 Aug 2021 16:27:15 +0100 Subject: IVGCVSW-5924 Update 21.08 Doxygen Documents * Also updated latest symlink. Signed-off-by: Matthew Sloyan Change-Id: If9b4e0e52464abdf797b9eb858ae19bcc64c2aea --- ...twork_to_fp16_converter_tests_8cpp_source.xhtml | 132 +++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 21.08/_fp32_network_to_fp16_converter_tests_8cpp_source.xhtml (limited to '21.08/_fp32_network_to_fp16_converter_tests_8cpp_source.xhtml') diff --git a/21.08/_fp32_network_to_fp16_converter_tests_8cpp_source.xhtml b/21.08/_fp32_network_to_fp16_converter_tests_8cpp_source.xhtml new file mode 100644 index 0000000000..c085104da5 --- /dev/null +++ b/21.08/_fp32_network_to_fp16_converter_tests_8cpp_source.xhtml @@ -0,0 +1,132 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/test/optimizations/Fp32NetworkToFp16ConverterTests.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.08 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Fp32NetworkToFp16ConverterTests.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "../TestUtils.hpp"
7 
8 #include <Optimizer.hpp>
9 
10 #include <doctest/doctest.h>
11 
12 TEST_SUITE("Optimizer")
13 {
14 using namespace armnn::optimizations;
15 
16 TEST_CASE("Fp32NetworkToFp16OptimizationTest")
17 {
18  armnn::Graph graph;
19 
20  const armnn::TensorInfo infoFP32({ 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(infoFP32);
25 
26  auto floor = graph.AddLayer<armnn::FloorLayer>("floor");
27  floor->GetOutputSlot().SetTensorInfo(infoFP32);
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::ConvertFp32ToFp16Layer>, &IsLayerOfType<armnn::FloorLayer>,
43  &IsLayerOfType<armnn::ConvertFp16ToFp32Layer>, &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:402
+
ConstIterator cbegin() const
Returns const iterator pointing to the beginning of the list. Lowercase for range-based for loops...
Definition: Graph.hpp:172
+
int Connect(InputSlot &destination)
Definition: Layer.cpp:83
+
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 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
+
OptimizeForType< Layer, ConvertFp32NetworkToFp16Impl > Fp32NetworkToFp16Converter
+ +
ConstIterator cend() const
Returns const iterator pointing to the end of the list. Lowercase for range-based for loops...
Definition: Graph.hpp:174
+
TEST_SUITE("Optimizer")
+
+
+ + + + -- cgit v1.2.1