From ae050524109f1ce827962665436ef7430f2ac479 Mon Sep 17 00:00:00 2001 From: David Monahan Date: Wed, 22 Mar 2023 16:48:58 +0000 Subject: IVGCVSW-7255 Update Doxygen Documentation and publish on GitHub. * Updating Doxygen documentation for 23.02 release. Signed-off-by: David Monahan Change-Id: I545574ff7664b4595d2fe6a91a3c35d2ad55df82 --- 23.02/_cl_gather_workload_8cpp_source.xhtml | 144 ++++++++++++++++++++-------- 1 file changed, 102 insertions(+), 42 deletions(-) (limited to '23.02/_cl_gather_workload_8cpp_source.xhtml') diff --git a/23.02/_cl_gather_workload_8cpp_source.xhtml b/23.02/_cl_gather_workload_8cpp_source.xhtml index 09918e6e54..35b4a5aba0 100644 --- a/23.02/_cl_gather_workload_8cpp_source.xhtml +++ b/23.02/_cl_gather_workload_8cpp_source.xhtml @@ -8,7 +8,7 @@ - + ArmNN: src/backends/cl/workloads/ClGatherWorkload.cpp Source File @@ -19,9 +19,6 @@ - @@ -30,7 +27,8 @@ extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], }); - + + @@ -51,18 +49,21 @@ - + +/* @license-end */
@@ -76,7 +77,9 @@ $(function() {
@@ -98,47 +101,104 @@ $(document).ready(function(){initNavTree('_cl_gather_workload_8cpp_source.xhtml'
ClGatherWorkload.cpp
-Go to the documentation of this file.
1 //
2 // Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "ClGatherWorkload.hpp"
7 #include "ClWorkloadUtils.hpp"
9 #include <cl/ClTensorHandle.hpp>
10 
11 using namespace armnn::armcomputetensorutils;
12 
13 namespace armnn
14 {
16  const TensorInfo& indices,
17  const TensorInfo& output,
18  const GatherDescriptor& descriptor)
19 {
20  const arm_compute::TensorInfo aclInput = BuildArmComputeTensorInfo(input);
21  const arm_compute::TensorInfo aclIndices = BuildArmComputeTensorInfo(indices);
22  const arm_compute::TensorInfo aclOutput = BuildArmComputeTensorInfo(output);
23 
24  int aclAxis = ComputeAclAxis(descriptor.m_Axis, input);
25 
26  return arm_compute::CLGather::validate(&aclInput, &aclIndices, &aclOutput, aclAxis);
27 }
28 
30  const WorkloadInfo& info,
31  const arm_compute::CLCompileContext& clCompileContext)
32  : ClBaseWorkload<GatherQueueDescriptor>(descriptor, info)
33 {
34  // Report Profiling Details
35  ARMNN_REPORT_PROFILING_WORKLOAD_DESC("ClGatherWorkload_Construct",
36  descriptor.m_Parameters,
37  info,
38  this->GetGuid());
39 
40  m_Data.ValidateInputsOutputs("ClGatherWorkload", 2, 1);
41 
42  arm_compute::ICLTensor& input = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
43  arm_compute::ICLTensor& indices = static_cast<IClTensorHandle*>(m_Data.m_Inputs[1])->GetTensor();
44  arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
45 
46  int aclAxis = ComputeAclAxis(descriptor.m_Parameters.m_Axis, info.m_InputTensorInfos[0]);
47 
48  {
49  ARMNN_SCOPED_PROFILING_EVENT(Compute::Undefined, "ClGatherWorkload_configure");
50  m_Layer.configure(clCompileContext, &input, &indices, &output, aclAxis);
51  }
52 };
53 
55 {
56  ARMNN_SCOPED_PROFILING_EVENT_CL_GUID("ClGatherWorkload_Execute", this->GetGuid());
57  RunClFunction(m_Layer, CHECK_LOCATION());
58 }
59 } // namespace armnn
#define ARMNN_SCOPED_PROFILING_EVENT_CL_GUID(name, guid)
- -
int ComputeAclAxis(const int &armnnAxis, const armnn::TensorInfo &tensor)
Function to convert ArmNN axis (left to right) to ACL axis (right to left) ranging from [-rank...
- - - -
ClGatherWorkload(const GatherQueueDescriptor &descriptor, const WorkloadInfo &info, const arm_compute::CLCompileContext &clCompileContext)
-
void RunClFunction(arm_compute::IFunction &function, const CheckLocation &location)
-
arm::pipe::ProfilingGuid GetGuid() const final
Definition: Workload.hpp:61
-
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
-
Copyright (c) 2021 ARM Limited and Contributors.
- -
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:220
-
std::vector< TensorInfo > m_InputTensorInfos
- - -
A GatherDescriptor for the GatherLayer.
-
Status
enumeration
Definition: Types.hpp:42
-
arm_compute::Status ClGatherWorkloadValidate(const TensorInfo &input, const TensorInfo &indices, const TensorInfo &output, const GatherDescriptor &descriptor)
- -
#define CHECK_LOCATION()
Definition: Exceptions.hpp:203
-
int32_t m_Axis
The axis in params to gather indices from.
- -
std::vector< ITensorHandle * > m_Outputs
- - -
#define ARMNN_REPORT_PROFILING_WORKLOAD_DESC(name, desc, infos, guid)
Definition: Profiling.hpp:227
-
Contains information about TensorInfos of a layer.
-
std::vector< ITensorHandle * > m_Inputs
- - -
void Execute() const override
+Go to the documentation of this file.
1 //
+
2 // Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
+
3 // SPDX-License-Identifier: MIT
+
4 //
+
5 
+
6 #include "ClGatherWorkload.hpp"
+
7 #include "ClWorkloadUtils.hpp"
+ +
9 #include <cl/ClTensorHandle.hpp>
+
10 
+
11 using namespace armnn::armcomputetensorutils;
+
12 
+
13 namespace armnn
+
14 {
+ +
16  const TensorInfo& indices,
+
17  const TensorInfo& output,
+
18  const GatherDescriptor& descriptor)
+
19 {
+
20  const arm_compute::TensorInfo aclInput = BuildArmComputeTensorInfo(input);
+
21  const arm_compute::TensorInfo aclIndices = BuildArmComputeTensorInfo(indices);
+
22  const arm_compute::TensorInfo aclOutput = BuildArmComputeTensorInfo(output);
+
23 
+
24  int aclAxis = ComputeAclAxis(descriptor.m_Axis, input);
+
25 
+
26  return arm_compute::CLGather::validate(&aclInput, &aclIndices, &aclOutput, aclAxis);
+
27 }
+
28 
+ +
30  const WorkloadInfo& info,
+
31  const arm_compute::CLCompileContext& clCompileContext)
+ +
33 {
+
34  // Report Profiling Details
+
35  ARMNN_REPORT_PROFILING_WORKLOAD_DESC("ClGatherWorkload_Construct",
+
36  descriptor.m_Parameters,
+
37  info,
+
38  this->GetGuid());
+
39 
+
40  m_Data.ValidateInputsOutputs("ClGatherWorkload", 2, 1);
+
41 
+
42  arm_compute::ICLTensor& input = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
+
43  arm_compute::ICLTensor& indices = static_cast<IClTensorHandle*>(m_Data.m_Inputs[1])->GetTensor();
+
44  arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
+
45 
+
46  int aclAxis = ComputeAclAxis(descriptor.m_Parameters.m_Axis, info.m_InputTensorInfos[0]);
+
47 
+
48  {
+
49  ARMNN_SCOPED_PROFILING_EVENT(Compute::Undefined, "ClGatherWorkload_configure");
+
50  m_Layer.configure(clCompileContext, &input, &indices, &output, aclAxis);
+
51  }
+
52 };
+
53 
+ +
55 {
+
56  ARMNN_SCOPED_PROFILING_EVENT_CL_GUID("ClGatherWorkload_Execute", this->GetGuid());
+
57  RunClFunction(m_Layer, CHECK_LOCATION());
+
58 }
+
59 } // namespace armnn
+
A GatherDescriptor for the GatherLayer.
+
arm::pipe::ProfilingGuid GetGuid() const final
Definition: Workload.hpp:61
+ +
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
+
ClGatherWorkload(const GatherQueueDescriptor &descriptor, const WorkloadInfo &info, const arm_compute::CLCompileContext &clCompileContext)
+
#define CHECK_LOCATION()
Definition: Exceptions.hpp:203
+ +
int ComputeAclAxis(const int &armnnAxis, const armnn::TensorInfo &tensor)
Function to convert ArmNN axis (left to right) to ACL axis (right to left) ranging from [-rank,...
+ + +
Copyright (c) 2021 ARM Limited and Contributors.
+
arm_compute::Status ClGatherWorkloadValidate(const TensorInfo &input, const TensorInfo &indices, const TensorInfo &output, const GatherDescriptor &descriptor)
+
int32_t m_Axis
The axis in params to gather indices from.
+
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:220
+ + +
void RunClFunction(arm_compute::IFunction &function, const CheckLocation &location)
+
Status
Definition: Types.hpp:42
+ + +
Contains information about TensorInfos of a layer.
+ +
#define ARMNN_REPORT_PROFILING_WORKLOAD_DESC(name, desc, infos, guid)
Definition: Profiling.hpp:227
+ +
std::vector< ITensorHandle * > m_Outputs
+
void Execute() const override
+
#define ARMNN_SCOPED_PROFILING_EVENT_CL_GUID(name, guid)
+ +
std::vector< ITensorHandle * > m_Inputs
+ -- cgit v1.2.1