ArmNN
 25.11
Loading...
Searching...
No Matches
NeonConvolution2dWorkload.hpp
Go to the documentation of this file.
1//
2// Copyright © 2017,2022 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
9
10#include <arm_compute/runtime/IFunction.h>
11#include <arm_compute/runtime/Tensor.h>
12#include <arm_compute/runtime/MemoryManagerOnDemand.h>
13
14#include <memory>
15
16namespace armnn
17{
18
19arm_compute::Status NeonConvolution2dWorkloadValidate(const TensorInfo& input,
20 const TensorInfo& output,
21 const Convolution2dDescriptor& descriptor,
22 const TensorInfo& weights,
23 const Optional<TensorInfo>& biases,
24 bool isFastMathEnabled = false,
25 const ActivationDescriptor* activationDescriptor = nullptr);
26
27class NeonConvolution2dWorkload : public NeonBaseWorkload<Convolution2dQueueDescriptor>
28{
29public:
31
33 const WorkloadInfo& info,
34 std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager,
35 const bool isFastMathENabled = false);
36
37 void Execute() const override;
38
39 arm_compute::ConvolutionMethod GetConvolutionMethod() const;
40
41private:
42 std::unique_ptr<arm_compute::IFunction> m_ConvolutionLayer;
43
44 mutable std::unique_ptr<arm_compute::Tensor> m_KernelTensor;
45 mutable std::unique_ptr<arm_compute::Tensor> m_BiasTensor;
46 TensorInfo m_KernelTensorInfo;
47 TensorInfo m_BiasTensorInfo;
48 arm_compute::ConvolutionMethod m_ConvolutionMethod;
49 mutable bool prepared = false;
50};
51
52} //namespace armnn
NeonBaseWorkload(const Convolution2dQueueDescriptor &descriptor, const WorkloadInfo &info)
arm_compute::ConvolutionMethod GetConvolutionMethod() const
NeonConvolution2dWorkload(const Convolution2dQueueDescriptor &descriptor, const WorkloadInfo &info, std::shared_ptr< arm_compute::MemoryManagerOnDemand > &memoryManager, const bool isFastMathENabled=false)
Copyright (c) 2021 ARM Limited and Contributors.
arm_compute::Status NeonConvolution2dWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const Convolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, bool isFastMathEnabled, const ActivationDescriptor *activationDescriptor)
An ActivationDescriptor for the ActivationLayer.
A Convolution2dDescriptor for the Convolution2dLayer.
Contains information about TensorInfos of a layer.