diff options
author | Francis Murtagh <francis.murtagh@arm.com> | 2019-05-27 12:14:10 +0100 |
---|---|---|
committer | Francis Murtagh <francis.murtagh@arm.com> | 2019-05-27 12:14:10 +0100 |
commit | 43aec5886449c1b024b740fd6f4500e827bde221 (patch) | |
tree | c12a128dcc6895a0663a4e4dd27c4110e492c6dd /src/backends/reference/workloads/RefFullyConnectedWorkload.hpp | |
parent | 7f2c35a82ec11be50b3478bd15207320bbf3bd57 (diff) | |
download | armnn-43aec5886449c1b024b740fd6f4500e827bde221.tar.gz |
IVGCVSW-3134 Refactor FullyConnected workloads into single workload
* Refactor FullyConnected workloads into single workload.
* Refactor FullyConnected ref implementation to use Encoders
and Decoders to support all DataTypes.
* Deleted RefFullyConnectedFloat32Workload and
RefFullyConnected2dUint8Workload.
Change-Id: Iad30fb0287ab7491e1297997e7d61f1d00785541
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Diffstat (limited to 'src/backends/reference/workloads/RefFullyConnectedWorkload.hpp')
-rw-r--r-- | src/backends/reference/workloads/RefFullyConnectedWorkload.hpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/backends/reference/workloads/RefFullyConnectedWorkload.hpp b/src/backends/reference/workloads/RefFullyConnectedWorkload.hpp new file mode 100644 index 0000000000..d4a63d23ae --- /dev/null +++ b/src/backends/reference/workloads/RefFullyConnectedWorkload.hpp @@ -0,0 +1,43 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include <backendsCommon/Workload.hpp> +#include <backendsCommon/WorkloadData.hpp> +#include "BaseIterator.hpp" +#include "Decoders.hpp" +#include "Encoders.hpp" + + +namespace armnn +{ + +class RefFullyConnectedWorkload : public BaseWorkload<FullyConnectedQueueDescriptor> +{ +public: + explicit RefFullyConnectedWorkload(const FullyConnectedQueueDescriptor& 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_WeightDecoder; + std::unique_ptr<Decoder<float>> m_BiasDecoder; + + TensorShape m_InputShape; + TensorShape m_OutputShape; + TensorShape m_WeightShape; + unsigned int m_NumActivations; +}; + +} //namespace armnn |