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 | // |
Matteo Martincigh | 4912402 | 2019-01-11 13:25:59 +0000 | [diff] [blame] | 5 | |
Nattapat Chaimanowong | cfdcadf | 2018-12-06 11:54:33 +0000 | [diff] [blame] | 6 | #include "RefDebugWorkload.hpp" |
| 7 | #include "Debug.hpp" |
Nattapat Chaimanowong | cfdcadf | 2018-12-06 11:54:33 +0000 | [diff] [blame] | 8 | #include "RefWorkloadUtils.hpp" |
Matteo Martincigh | 4912402 | 2019-01-11 13:25:59 +0000 | [diff] [blame] | 9 | |
| 10 | #include <TypeUtils.hpp> |
Nattapat Chaimanowong | cfdcadf | 2018-12-06 11:54:33 +0000 | [diff] [blame] | 11 | |
| 12 | namespace armnn |
| 13 | { |
| 14 | |
| 15 | template<armnn::DataType DataType> |
| 16 | void RefDebugWorkload<DataType>::Execute() const |
| 17 | { |
| 18 | using T = ResolveType<DataType>; |
| 19 | |
| 20 | ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, GetName() + "_Execute"); |
| 21 | |
| 22 | const TensorInfo& inputInfo = GetTensorInfo(m_Data.m_Inputs[0]); |
| 23 | const TensorInfo& outputInfo = GetTensorInfo(m_Data.m_Outputs[0]); |
| 24 | |
| 25 | const T* inputData = GetInputTensorData<T>(0, m_Data); |
| 26 | T* outputData = GetOutputTensorData<T>(0, m_Data); |
| 27 | |
| 28 | Debug(inputInfo, outputInfo, m_Data.m_Parameters, inputData, outputData); |
| 29 | } |
| 30 | |
| 31 | template class RefDebugWorkload<DataType::Float32>; |
| 32 | template class RefDebugWorkload<DataType::QuantisedAsymm8>; |
| 33 | |
Matteo Martincigh | 4912402 | 2019-01-11 13:25:59 +0000 | [diff] [blame] | 34 | } // namespace armnn |