From 55b1cda7d242ceb22963fd40370c2e6dbbb074ba Mon Sep 17 00:00:00 2001 From: Nattapat Chaimanowong Date: Wed, 10 Oct 2018 14:51:27 +0100 Subject: IVGCVSW-1951 Remove type templating from ClConstantWorkload Change-Id: Ib2c9fe56c59aedabeff899a81a0afe260bd57c9f --- .../cl/workloads/ClBaseConstantWorkload.cpp | 65 ---------------------- 1 file changed, 65 deletions(-) delete mode 100644 src/backends/cl/workloads/ClBaseConstantWorkload.cpp (limited to 'src/backends/cl/workloads/ClBaseConstantWorkload.cpp') diff --git a/src/backends/cl/workloads/ClBaseConstantWorkload.cpp b/src/backends/cl/workloads/ClBaseConstantWorkload.cpp deleted file mode 100644 index 848ab5ade6..0000000000 --- a/src/backends/cl/workloads/ClBaseConstantWorkload.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright © 2017 Arm Ltd. All rights reserved. -// SPDX-License-Identifier: MIT -// - -#include "ClBaseConstantWorkload.hpp" - -#include -#include -#include -#include - -#include "ClWorkloadUtils.hpp" - -namespace armnn -{ - -template class ClBaseConstantWorkload; -template class ClBaseConstantWorkload; - -template -void ClBaseConstantWorkload::Execute() const -{ - // The intermediate tensor held by the corresponding layer output handler can be initialised with the given data - // on the first inference, then reused for subsequent inferences. - // The initialisation cannot happen at workload construction time since the ACL kernel for the next layer may not - // have been configured at the time. - if (!m_RanOnce) - { - const ConstantQueueDescriptor& data = this->m_Data; - - BOOST_ASSERT(data.m_LayerOutput != nullptr); - arm_compute::CLTensor& output = static_cast(data.m_Outputs[0])->GetTensor(); - arm_compute::DataType computeDataType = static_cast(data.m_Outputs[0])->GetDataType(); - - switch (computeDataType) - { - case arm_compute::DataType::F16: - { - CopyArmComputeClTensorData(output, data.m_LayerOutput->GetConstTensor()); - break; - } - case arm_compute::DataType::F32: - { - CopyArmComputeClTensorData(output, data.m_LayerOutput->GetConstTensor()); - break; - } - case arm_compute::DataType::QASYMM8: - { - CopyArmComputeClTensorData(output, data.m_LayerOutput->GetConstTensor()); - break; - } - default: - { - BOOST_ASSERT_MSG(false, "Unknown data type"); - break; - } - } - - m_RanOnce = true; - } -} - - -} //namespace armnn -- cgit v1.2.1