Nattapat Chaimanowong | cfdcadf | 2018-12-06 11:54:33 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | #include "RefDebugWorkload.hpp" |
| 6 | #include "Debug.hpp" |
| 7 | |
| 8 | #include "RefWorkloadUtils.hpp" |
| 9 | #include "TypeUtils.hpp" |
| 10 | |
| 11 | namespace armnn |
| 12 | { |
| 13 | |
| 14 | template<armnn::DataType DataType> |
| 15 | void RefDebugWorkload<DataType>::Execute() const |
| 16 | { |
| 17 | using T = ResolveType<DataType>; |
| 18 | |
| 19 | ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, GetName() + "_Execute"); |
| 20 | |
| 21 | const TensorInfo& inputInfo = GetTensorInfo(m_Data.m_Inputs[0]); |
| 22 | const TensorInfo& outputInfo = GetTensorInfo(m_Data.m_Outputs[0]); |
| 23 | |
| 24 | const T* inputData = GetInputTensorData<T>(0, m_Data); |
| 25 | T* outputData = GetOutputTensorData<T>(0, m_Data); |
| 26 | |
| 27 | Debug(inputInfo, outputInfo, m_Data.m_Parameters, inputData, outputData); |
| 28 | } |
| 29 | |
| 30 | template class RefDebugWorkload<DataType::Float32>; |
| 31 | template class RefDebugWorkload<DataType::QuantisedAsymm8>; |
| 32 | |
| 33 | } //namespace armnn |