From add078b7f9a658d52ee6e8fe6771ea0517c07674 Mon Sep 17 00:00:00 2001 From: mathad01 Date: Mon, 10 May 2021 16:51:20 +0100 Subject: IVGCVSW-5908 Update 21.05 Doxygen Documents Signed-off-by: mathad01 Change-Id: I95316d4fc5f9d10185492dc835bb2411c1daea7b --- ...fp32_network_to_fp16_converter_tests_8cpp.xhtml | 165 +++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 21.05/_fp32_network_to_fp16_converter_tests_8cpp.xhtml (limited to '21.05/_fp32_network_to_fp16_converter_tests_8cpp.xhtml') diff --git a/21.05/_fp32_network_to_fp16_converter_tests_8cpp.xhtml b/21.05/_fp32_network_to_fp16_converter_tests_8cpp.xhtml new file mode 100644 index 0000000000..575ba547c4 --- /dev/null +++ b/21.05/_fp32_network_to_fp16_converter_tests_8cpp.xhtml @@ -0,0 +1,165 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/test/optimizations/Fp32NetworkToFp16ConverterTests.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.05 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Fp32NetworkToFp16ConverterTests.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 (Fp32NetworkToFp16OptimizationTest)
 
+

Function Documentation

+ +

◆ BOOST_AUTO_TEST_CASE()

+ +
+
+ + + + + + + + +
BOOST_AUTO_TEST_CASE (Fp32NetworkToFp16OptimizationTest )
+
+ +

Definition at line 15 of file Fp32NetworkToFp16ConverterTests.cpp.

+ +

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

+
16 {
17  armnn::Graph graph;
18 
19  const armnn::TensorInfo infoFP32({ 2, 2, 1, 3 }, armnn::DataType::Float32);
20 
21  // Create the simple test network
22  auto input = graph.AddLayer<armnn::InputLayer>(0, "input");
23  input->GetOutputSlot().SetTensorInfo(infoFP32);
24 
25  auto floor = graph.AddLayer<armnn::FloorLayer>("floor");
26  floor->GetOutputSlot().SetTensorInfo(infoFP32);
27 
28  auto output = graph.AddLayer<armnn::OutputLayer>(1, "output");
29 
30  // Connect up the layers
31  input->GetOutputSlot().Connect(floor->GetInputSlot(0));
32  floor->GetOutputSlot().Connect(output->GetInputSlot(0));
33 
34  BOOST_TEST(CheckSequence(graph.cbegin(), graph.cend(), &IsLayerOfType<armnn::InputLayer>,
35  &IsLayerOfType<armnn::FloorLayer>, &IsLayerOfType<armnn::OutputLayer>));
36 
37  // Run the optimizer
39 
40  BOOST_TEST(CheckSequence(graph.cbegin(), graph.cend(), &IsLayerOfType<armnn::InputLayer>,
41  &IsLayerOfType<armnn::ConvertFp32ToFp16Layer>, &IsLayerOfType<armnn::FloorLayer>,
42  &IsLayerOfType<armnn::ConvertFp16ToFp32Layer>, &IsLayerOfType<armnn::OutputLayer>));
43 }
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
+
+
+
+
+
+ + + + -- cgit v1.2.1