diff options
author | Ruomei Yan <ruomei.yan@arm.com> | 2019-05-23 11:37:33 +0100 |
---|---|---|
committer | Ruomei Yan <ruomei.yan@arm.com> | 2019-05-23 11:51:39 +0100 |
commit | 495852f2adef1d11fbf13ce6347cf61973ce1a65 (patch) | |
tree | 9c26ac47362548e001ad7e5203212d2ef3226e9d /src/backends/reference/workloads/RefDepthwiseConvolution2dWorkload.hpp | |
parent | 9b3983299f882c8d84c5abd0d40ca75a801ea7f2 (diff) | |
download | armnn-495852f2adef1d11fbf13ce6347cf61973ce1a65.tar.gz |
IVGCVSW-3073 Refactor reference DepthwiseConvolution2d workloads
Change-Id: I3cf8d9dbc4f8c95e0e2311505dd7e9f9069f1ab5
Signed-off-by: Ruomei Yan <ruomei.yan@arm.com>
Diffstat (limited to 'src/backends/reference/workloads/RefDepthwiseConvolution2dWorkload.hpp')
-rw-r--r-- | src/backends/reference/workloads/RefDepthwiseConvolution2dWorkload.hpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/backends/reference/workloads/RefDepthwiseConvolution2dWorkload.hpp b/src/backends/reference/workloads/RefDepthwiseConvolution2dWorkload.hpp new file mode 100644 index 0000000000..6d7037f660 --- /dev/null +++ b/src/backends/reference/workloads/RefDepthwiseConvolution2dWorkload.hpp @@ -0,0 +1,39 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// +#include <backendsCommon/Workload.hpp> +#include <backendsCommon/WorkloadData.hpp> +#include "Decoders.hpp" +#include "Encoders.hpp" + +#include <armnn/TypesUtils.hpp> + +namespace armnn +{ + +class RefDepthwiseConvolution2dWorkload : public BaseWorkload<DepthwiseConvolution2dQueueDescriptor> { +public: + explicit RefDepthwiseConvolution2dWorkload(const DepthwiseConvolution2dQueueDescriptor &descriptor, + const WorkloadInfo &info); + + void PostAllocationConfigure() override; + + virtual void Execute() const override; + +private: + + std::unique_ptr <ScopedCpuTensorHandle> m_Weight; + std::unique_ptr <ScopedCpuTensorHandle> m_Bias; + + std::unique_ptr <Decoder<float>> m_InputDecoder; + std::unique_ptr <Encoder<float>> m_OutputEncoder; + std::unique_ptr <Decoder<float>> m_FilterDecoder; + std::unique_ptr <Decoder<float>> m_BiasDecoder; + + TensorShape m_InputShape; + TensorShape m_OutputShape; + TensorShape m_FilterShape; +}; + +} //namespace armnn |