diff options
author | narpra01 <narumol.prangnawarat@arm.com> | 2019-01-23 15:23:11 +0000 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2019-01-23 17:13:15 +0000 |
commit | db2b160bf9e7759d0157dfa57ee940290f5170e3 (patch) | |
tree | 536fa36ebc9eb8442b96b486a10cadab28d32647 /src/backends/reference/workloads/RefBaseConstantWorkload.cpp | |
parent | c625f000198218fc8d03130ee5658f73b94b2683 (diff) | |
download | armnn-db2b160bf9e7759d0157dfa57ee940290f5170e3.tar.gz |
IVGCVSW-2511 Add end to end Gather layer test
* Add end to end test for Gather operator
* Add Support for int32 to Constant layer for Ref
* Add Int32Workload
* Add RefConstantWorkload as template for float, uint8, int32
* Remove unused RefBaseConstantWorkload
* Remove unused RefConstantFloat32Workload
* Remove unused RefConstantUint8Workload
* Add support check for int32 in LayerSupport functions
Change-Id: Ic970588a49ebe2aafb12be8adef52371feacaa7b
Diffstat (limited to 'src/backends/reference/workloads/RefBaseConstantWorkload.cpp')
-rw-r--r-- | src/backends/reference/workloads/RefBaseConstantWorkload.cpp | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/backends/reference/workloads/RefBaseConstantWorkload.cpp b/src/backends/reference/workloads/RefBaseConstantWorkload.cpp deleted file mode 100644 index 647677b4fb..0000000000 --- a/src/backends/reference/workloads/RefBaseConstantWorkload.cpp +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright © 2017 Arm Ltd. All rights reserved. -// SPDX-License-Identifier: MIT -// - -#include "RefBaseConstantWorkload.hpp" - -#include "RefWorkloadUtils.hpp" - -#include <armnn/Types.hpp> - -#include <boost/assert.hpp> - -#include <cstring> - -namespace armnn -{ - -template <armnn::DataType DataType> -void RefBaseConstantWorkload<DataType>::Execute() const -{ - // Considering the reference backend independently, it could be possible to initialise the intermediate tensor - // created by the layer output handler at workload construction time, rather than at workload execution time. - // However, this is not an option for other backends (e.g. CL). For consistency, we prefer to align all - // implementations. - // A similar argument can be made about performing the memory copy in the first place (the layer output handler - // could have a non-owning reference to the layer output tensor managed by the const input layer); again, this is - // not an option for other backends, and the extra complexity required to make this work for the reference backend - // may not be worth the effort (skipping a memory copy in the first inference). - if (!m_RanOnce) - { - const ConstantQueueDescriptor& data = this->m_Data; - - BOOST_ASSERT(data.m_LayerOutput != nullptr); - - const TensorInfo& outputInfo = GetTensorInfo(data.m_Outputs[0]); - BOOST_ASSERT(data.m_LayerOutput->GetTensorInfo().GetNumBytes() == outputInfo.GetNumBytes()); - - memcpy(GetOutputTensorData<void>(0, data), data.m_LayerOutput->GetConstTensor<void>(), - outputInfo.GetNumBytes()); - - m_RanOnce = true; - } -} - -template class RefBaseConstantWorkload<DataType::Float32>; -template class RefBaseConstantWorkload<DataType::QuantisedAsymm8>; - -} //namespace armnn |