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 --- ...rm_compute_tensor_utils_tests_8cpp_source.xhtml | 123 +++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 21.02/_arm_compute_tensor_utils_tests_8cpp_source.xhtml (limited to '21.02/_arm_compute_tensor_utils_tests_8cpp_source.xhtml') diff --git a/21.02/_arm_compute_tensor_utils_tests_8cpp_source.xhtml b/21.02/_arm_compute_tensor_utils_tests_8cpp_source.xhtml new file mode 100644 index 0000000000..488d0d3f89 --- /dev/null +++ b/21.02/_arm_compute_tensor_utils_tests_8cpp_source.xhtml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + +ArmNN: src/backends/aclCommon/test/ArmComputeTensorUtilsTests.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
ArmComputeTensorUtilsTests.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2019 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 
8 #include <boost/test/unit_test.hpp>
9 
10 using namespace armnn::armcomputetensorutils;
11 
12 BOOST_AUTO_TEST_SUITE(ArmComputeTensorUtils)
13 
14 BOOST_AUTO_TEST_CASE(BuildArmComputeTensorInfoTest)
15 {
16 
17  const armnn::TensorShape tensorShape = { 1, 2, 3, 4 };
19 
20  const std::vector<float> quantScales = { 1.5f, 2.5f, 3.5f, 4.5f };
21  const float quantScale = quantScales[0];
22  const int32_t quantOffset = 128;
23 
24  // Tensor info with per-tensor quantization
25  const armnn::TensorInfo tensorInfo0(tensorShape, dataType, quantScale, quantOffset);
26  const arm_compute::TensorInfo aclTensorInfo0 = BuildArmComputeTensorInfo(tensorInfo0);
27 
28  const arm_compute::TensorShape& aclTensorShape = aclTensorInfo0.tensor_shape();
29  BOOST_CHECK(aclTensorShape.num_dimensions() == tensorShape.GetNumDimensions());
30  for(unsigned int i = 0u; i < tensorShape.GetNumDimensions(); ++i)
31  {
32  // NOTE: arm_compute tensor dimensions are stored in the opposite order
33  BOOST_CHECK(aclTensorShape[i] == tensorShape[tensorShape.GetNumDimensions() - i - 1]);
34  }
35 
36  BOOST_CHECK(aclTensorInfo0.data_type() == arm_compute::DataType::QASYMM8);
37  BOOST_CHECK(aclTensorInfo0.quantization_info().scale()[0] == quantScale);
38 
39  // Tensor info with per-axis quantization
40  const armnn::TensorInfo tensorInfo1(tensorShape, dataType, quantScales, 0);
41  const arm_compute::TensorInfo aclTensorInfo1 = BuildArmComputeTensorInfo(tensorInfo1);
42 
43  BOOST_CHECK(aclTensorInfo1.quantization_info().scale() == quantScales);
44 }
45 
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
+ + + +
DataType
Definition: Types.hpp:32
+ +
BOOST_AUTO_TEST_CASE(CheckConvolution2dLayer)
+
BOOST_AUTO_TEST_SUITE_END()
+
unsigned int GetNumDimensions() const
Function that returns the tensor rank.
Definition: Tensor.cpp:174
+ +
+
+ + + + -- cgit v1.2.1