ArmNN
 24.02
NeonBatchNormalizationWorkload.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include "NeonBaseWorkload.hpp"
9 
10 #include <arm_compute/runtime/IFunction.h>
11 #include <arm_compute/runtime/Tensor.h>
12 
13 #include <memory>
14 
15 namespace armnn
16 {
17 
19  const TensorInfo& output,
20  const TensorInfo& mean,
21  const TensorInfo& var,
22  const TensorInfo& beta,
23  const TensorInfo& gamma,
24  const BatchNormalizationDescriptor& descriptor,
25  const ActivationDescriptor* activationDescriptor = nullptr);
26 
27 class NeonBatchNormalizationWorkload : public NeonBaseWorkload<BatchNormalizationQueueDescriptor>
28 {
29 public:
31  const WorkloadInfo& info);
32  virtual void Execute() const override;
33 
34 private:
35  std::unique_ptr<arm_compute::IFunction> m_Layer;
36 
37  std::unique_ptr<arm_compute::Tensor> m_Mean;
38  std::unique_ptr<arm_compute::Tensor> m_Variance;
39  std::unique_ptr<arm_compute::Tensor> m_Gamma;
40  std::unique_ptr<arm_compute::Tensor> m_Beta;
41 
42  void FreeUnusedTensors();
43 };
44 
45 } //namespace armnn
46 
armnn::BatchNormalizationQueueDescriptor
Definition: WorkloadData.hpp:311
armnn::NeonBatchNormalizationWorkload::NeonBatchNormalizationWorkload
NeonBatchNormalizationWorkload(const BatchNormalizationQueueDescriptor &descriptor, const WorkloadInfo &info)
Definition: NeonBatchNormalizationWorkload.cpp:59
NeonBaseWorkload.hpp
armnn::NeonBatchNormalizationWorkload::Execute
virtual void Execute() const override
Definition: NeonBatchNormalizationWorkload.cpp:114
armnn::WorkloadInfo
Contains information about TensorInfos of a layer.
Definition: WorkloadInfo.hpp:16
armnn::BoostLogSeverityMapping::info
@ info
armnn::NeonBatchNormalizationWorkload
Definition: NeonBatchNormalizationWorkload.hpp:27
armnn::Status
Status
Definition: Types.hpp:42
armnn::NeonBatchNormalizationValidate
arm_compute::Status NeonBatchNormalizationValidate(const TensorInfo &input, const TensorInfo &output, const TensorInfo &mean, const TensorInfo &var, const TensorInfo &beta, const TensorInfo &gamma, const BatchNormalizationDescriptor &descriptor, const ActivationDescriptor *activationDescriptor)
Definition: NeonBatchNormalizationWorkload.cpp:24
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::NeonBaseWorkload
Definition: NeonBaseWorkload.hpp:13