Nattapat Chaimanowong | a76698c | 2018-10-11 10:29:15 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include "ClReshapeWorkload.hpp" |
Aron Virginas-Tar | c9cc804 | 2018-11-01 16:15:57 +0000 | [diff] [blame] | 7 | #include <cl/ClTensorHandle.hpp> |
| 8 | #include <backendsCommon/CpuTensorHandle.hpp> |
Nattapat Chaimanowong | a76698c | 2018-10-11 10:29:15 +0100 | [diff] [blame] | 9 | |
| 10 | #include "ClWorkloadUtils.hpp" |
| 11 | |
| 12 | namespace armnn |
| 13 | { |
| 14 | |
| 15 | ClReshapeWorkload::ClReshapeWorkload(const ReshapeQueueDescriptor& descriptor, const WorkloadInfo& info) |
| 16 | : BaseWorkload<ReshapeQueueDescriptor>(descriptor, info) |
| 17 | { |
| 18 | m_Data.ValidateInputsOutputs("ClReshapeWorkload", 1, 1); |
| 19 | |
| 20 | arm_compute::ICLTensor& input = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor(); |
| 21 | arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor(); |
| 22 | |
| 23 | m_Layer.configure(&input, &output); |
| 24 | } |
| 25 | |
| 26 | void ClReshapeWorkload::Execute() const |
| 27 | { |
| 28 | ARMNN_SCOPED_PROFILING_EVENT_CL("ClReshapeWorkload_Execute"); |
Aron Virginas-Tar | a8e06ed | 2018-10-19 16:46:15 +0100 | [diff] [blame] | 29 | RunClFunction(m_Layer, CHECK_LOCATION()); |
Nattapat Chaimanowong | a76698c | 2018-10-11 10:29:15 +0100 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | } //namespace armnn |