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 --- ...convert_fp32_to_fp16_workload_8cpp_source.xhtml | 137 +++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 21.02/_cl_convert_fp32_to_fp16_workload_8cpp_source.xhtml (limited to '21.02/_cl_convert_fp32_to_fp16_workload_8cpp_source.xhtml') diff --git a/21.02/_cl_convert_fp32_to_fp16_workload_8cpp_source.xhtml b/21.02/_cl_convert_fp32_to_fp16_workload_8cpp_source.xhtml new file mode 100644 index 0000000000..85c7fa6b24 --- /dev/null +++ b/21.02/_cl_convert_fp32_to_fp16_workload_8cpp_source.xhtml @@ -0,0 +1,137 @@ + + + + + + + + + + + + + +ArmNN: src/backends/cl/workloads/ClConvertFp32ToFp16Workload.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
ClConvertFp32ToFp16Workload.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 #include <cl/ClTensorHandle.hpp>
8 
9 #include "ClWorkloadUtils.hpp"
10 
11 namespace armnn
12 {
13 using namespace armcomputetensorutils;
14 
15 static constexpr arm_compute::ConvertPolicy g_AclConvertPolicy = arm_compute::ConvertPolicy::SATURATE;
16 
18  const ConvertFp32ToFp16QueueDescriptor& descriptor,
19  const WorkloadInfo& info,
20  const arm_compute::CLCompileContext& clCompileContext) :
22 {
23  this->m_Data.ValidateInputsOutputs("ClConvertFp32ToFp16Workload", 1, 1);
24 
25  arm_compute::ICLTensor& input = static_cast<IClTensorHandle*>(this->m_Data.m_Inputs[0])->GetTensor();
26  arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(this->m_Data.m_Outputs[0])->GetTensor();
27 
28  m_Layer.configure(clCompileContext, &input, &output, g_AclConvertPolicy, 0);
29 }
30 
32 {
33  ARMNN_SCOPED_PROFILING_EVENT_CL("ClConvertFp32ToFp16Workload_Execute");
34  RunClFunction(m_Layer, CHECK_LOCATION());
35 }
36 
38 {
39  if (input.GetDataType() != DataType::Float32)
40  {
41  return arm_compute::Status(arm_compute::ErrorCode::RUNTIME_ERROR, "Input should be Float32");
42  }
43  if (output.GetDataType() != DataType::Float16)
44  {
45  return arm_compute::Status(arm_compute::ErrorCode::RUNTIME_ERROR, "Output should be Float16");
46  }
47 
48  const arm_compute::TensorInfo aclInputInfo = BuildArmComputeTensorInfo(input);
49  const arm_compute::TensorInfo aclOutputInfo = BuildArmComputeTensorInfo(output);
50 
51  const arm_compute::Status aclStatus = arm_compute::CLDepthConvertLayer::validate(
52  &aclInputInfo, &aclOutputInfo, g_AclConvertPolicy, 0);
53 
54  return aclStatus;
55 }
56 
57 
58 } //namespace armnn
arm_compute::Status ClConvertFp32ToFp16WorkloadValidate(const TensorInfo &input, const TensorInfo &output)
+ +
#define ARMNN_SCOPED_PROFILING_EVENT_CL(name)
+
void RunClFunction(arm_compute::IFunction &function, const CheckLocation &location)
+
const QueueDescriptor m_Data
Definition: Workload.hpp:46
+
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
+
Copyright (c) 2021 ARM Limited and Contributors.
+ +
DataType GetDataType() const
Definition: Tensor.hpp:194
+ +
Status
enumeration
Definition: Types.hpp:26
+ +
#define CHECK_LOCATION()
Definition: Exceptions.hpp:197
+
ClConvertFp32ToFp16Workload(const ConvertFp32ToFp16QueueDescriptor &descriptor, const WorkloadInfo &info, const arm_compute::CLCompileContext &clCompileContext)
+ + + +
std::vector< ITensorHandle * > m_Outputs
+ + + +
Contains information about inputs and outputs to a layer.
+
std::vector< ITensorHandle * > m_Inputs
+ +
+
+ + + + -- cgit v1.2.1