telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // See LICENSE file in the project root for full license information. |
| 4 | // |
| 5 | |
| 6 | #include "ClActivationFloat32Workload.hpp" |
| 7 | #include "backends/ClTensorHandle.hpp" |
| 8 | #include "backends/ArmComputeUtils.hpp" |
| 9 | |
| 10 | namespace armnn |
| 11 | { |
| 12 | |
| 13 | ClActivationFloat32Workload::ClActivationFloat32Workload(const ActivationQueueDescriptor& descriptor, |
| 14 | const WorkloadInfo& info) |
| 15 | : Float32Workload<ActivationQueueDescriptor>(descriptor, info) |
| 16 | { |
| 17 | m_Data.ValidateInputsOutputs("ClActivationFloat32Workload", 1, 1); |
| 18 | |
| 19 | const arm_compute::ActivationLayerInfo activationLayerInfo = |
| 20 | ConvertActivationDescriptorToAclActivationLayerInfo(m_Data.m_Parameters); |
| 21 | |
| 22 | arm_compute::ICLTensor& input = static_cast<ClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor(); |
| 23 | arm_compute::ICLTensor& output = static_cast<ClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor(); |
| 24 | m_ActivationLayer.configure(&input, &output, activationLayerInfo); |
| 25 | } |
| 26 | |
| 27 | void ClActivationFloat32Workload::Execute() const |
| 28 | { |
| 29 | ARMNN_SCOPED_PROFILING_EVENT(Compute::GpuAcc, "ClActivationFloat32Workload_Execute"); |
| 30 | m_ActivationLayer.run(); |
| 31 | } |
| 32 | |
| 33 | } //namespace armnn |