ArmNN
 25.11
Loading...
Searching...
No Matches
ClReverseV2Workload.cpp
Go to the documentation of this file.
1//
2// Copyright © 2023 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
7#include "ClWorkloadUtils.hpp"
11
12using namespace armnn::armcomputetensorutils;
13
14namespace armnn
15{
16arm_compute::Status ClReverseV2WorkloadValidate(const TensorInfo& input,
17 const TensorInfo& axis,
18 const TensorInfo& output)
19{
20 const arm_compute::TensorInfo aclInput = BuildArmComputeTensorInfo(input);
21 const arm_compute::TensorInfo aclAxis = BuildArmComputeTensorInfo(axis);
22 const arm_compute::TensorInfo aclOutput = BuildArmComputeTensorInfo(output);
23
24 return arm_compute::CLReverse::validate(&aclInput, &aclOutput, &aclAxis, true);
25}
26
29 const arm_compute::CLCompileContext& clCompileContext)
31{
32 m_Data.ValidateInputsOutputs("ClReverseV2Workload", 2, 1);
33
34 arm_compute::ICLTensor& input = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
35 arm_compute::ICLTensor& axis = static_cast<IClTensorHandle*>(m_Data.m_Inputs[1])->GetTensor();
36 arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
37
38 {
39 ARMNN_SCOPED_PROFILING_EVENT_CL_NAME_GUID("ClReverseV2Workload_configure");
40 m_Layer.configure(clCompileContext, &input, &output, &axis, true);
41 }
42}
43
45{
46 ARMNN_SCOPED_PROFILING_EVENT_CL_NAME_GUID("ClReverseV2Workload_Execute");
47 m_Layer.run();
48}
49
50} //namespace armnn
#define ARMNN_SCOPED_PROFILING_EVENT_CL_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
BaseWorkload(const ReverseV2QueueDescriptor &descriptor, const WorkloadInfo &info)
Definition Workload.hpp:35
ClReverseV2Workload(const ReverseV2QueueDescriptor &descriptor, const WorkloadInfo &info, const arm_compute::CLCompileContext &clCompileContext)
virtual arm_compute::ICLTensor & GetTensor()=0
Copyright (c) 2021 ARM Limited and Contributors.
arm_compute::Status ClReverseV2WorkloadValidate(const TensorInfo &input, const TensorInfo &axis, const TensorInfo &output)
Contains information about TensorInfos of a layer.