ArmNN
 21.02
ClBatchNormalizationFloatWorkload.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
9 
10 #include <arm_compute/runtime/CL/CLTensor.h>
11 #include <arm_compute/runtime/CL/functions/CLBatchNormalizationLayer.h>
12 
13 namespace armnn
14 {
15 
17  const TensorInfo& output,
18  const TensorInfo& mean,
19  const TensorInfo& var,
20  const TensorInfo& beta,
21  const TensorInfo& gamma,
22  const BatchNormalizationDescriptor& desc,
23  const ActivationDescriptor* activationDescriptor = nullptr);
24 
25 class ClBatchNormalizationFloatWorkload : public FloatWorkload<BatchNormalizationQueueDescriptor>
26 {
27 public:
29  const WorkloadInfo& info,
30  const arm_compute::CLCompileContext& clCompileContext);
31 
33  void Execute() const override;
34 
35 private:
36  mutable arm_compute::CLBatchNormalizationLayer m_Layer;
37 
38  std::unique_ptr<arm_compute::CLTensor> m_Mean;
39  std::unique_ptr<arm_compute::CLTensor> m_Variance;
40  std::unique_ptr<arm_compute::CLTensor> m_Gamma;
41  std::unique_ptr<arm_compute::CLTensor> m_Beta;
42 
43  void FreeUnusedTensors();
44 };
45 
46 } //namespace armnn
47 
48 
49 
50 
ClBatchNormalizationFloatWorkload(const BatchNormalizationQueueDescriptor &descriptor, const WorkloadInfo &info, const arm_compute::CLCompileContext &clCompileContext)
Copyright (c) 2021 ARM Limited and Contributors.
Status
enumeration
Definition: Types.hpp:26
arm_compute::Status ClBatchNormalizationValidate(const TensorInfo &input, const TensorInfo &output, const TensorInfo &mean, const TensorInfo &var, const TensorInfo &beta, const TensorInfo &gamma, const BatchNormalizationDescriptor &desc, const ActivationDescriptor *activationDescriptor)
Contains information about inputs and outputs to a layer.