From 43aec5886449c1b024b740fd6f4500e827bde221 Mon Sep 17 00:00:00 2001 From: Francis Murtagh Date: Mon, 27 May 2019 12:14:10 +0100 Subject: 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 --- .../workloads/RefFullyConnectedWorkload.hpp | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/backends/reference/workloads/RefFullyConnectedWorkload.hpp (limited to 'src/backends/reference/workloads/RefFullyConnectedWorkload.hpp') 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 +#include +#include "BaseIterator.hpp" +#include "Decoders.hpp" +#include "Encoders.hpp" + + +namespace armnn +{ + +class RefFullyConnectedWorkload : public BaseWorkload +{ +public: + explicit RefFullyConnectedWorkload(const FullyConnectedQueueDescriptor& descriptor, + const WorkloadInfo& info); + + void PostAllocationConfigure() override; + + virtual void Execute() const override; + +private: + std::unique_ptr m_Weight; + std::unique_ptr m_Bias; + + std::unique_ptr> m_InputDecoder; + std::unique_ptr> m_OutputEncoder; + std::unique_ptr> m_WeightDecoder; + std::unique_ptr> m_BiasDecoder; + + TensorShape m_InputShape; + TensorShape m_OutputShape; + TensorShape m_WeightShape; + unsigned int m_NumActivations; +}; + +} //namespace armnn -- cgit v1.2.1