ArmNN
 25.02
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NeonDequantizeWorkload.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2019-2023 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 
8 #include "NeonWorkloadUtils.hpp"
9 
10 #include <arm_compute/runtime/NEON/functions/NEDequantizationLayer.h>
11 
16 
17 namespace armnn
18 {
19 
20 using namespace armcomputetensorutils;
21 
23  const TensorInfo& output)
24 {
25  const arm_compute::TensorInfo aclInput = BuildArmComputeTensorInfo(input);
26  const arm_compute::TensorInfo aclOutput = BuildArmComputeTensorInfo(output);
27 
28  return arm_compute::NEDequantizationLayer::validate(&aclInput, &aclOutput);
29 }
30 
33 {
34  m_Data.ValidateInputsOutputs("NeonDequantizeWorkload", 1, 1);
35 
36  arm_compute::ITensor& input = PolymorphicDowncast<IAclTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
37  arm_compute::ITensor& output = PolymorphicDowncast<IAclTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
38 
39  std::unique_ptr<arm_compute::NEDequantizationLayer> layer(new arm_compute::NEDequantizationLayer());
40  layer->configure(&input, &output);
41  layer->prepare();
42  m_Layer.reset(layer.release());
43 }
44 
46 {
47  ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID("NeonDequantizeWorkload_Execute");
48  m_Layer->run();
49 }
50 
51 } //namespace armnn
52 
#define ARMNN_SCOPED_PROFILING_EVENT_NEON_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
QueueDescriptor m_Data
Definition: Workload.hpp:74
NeonDequantizeWorkload(const DequantizeQueueDescriptor &descriptor, const WorkloadInfo &info)
Copyright (c) 2021 ARM Limited and Contributors.
Status
enumeration
Definition: Types.hpp:43
arm_compute::Status NeonDequantizeWorkloadValidate(const TensorInfo &input, const TensorInfo &output)
std::vector< ITensorHandle * > m_Inputs
std::vector< ITensorHandle * > m_Outputs
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
Contains information about TensorInfos of a layer.