diff options
Diffstat (limited to 'src/backends/cl')
-rw-r--r-- | src/backends/cl/ClLayerSupport.cpp | 4 | ||||
-rw-r--r-- | src/backends/cl/ClLayerSupport.hpp | 3 | ||||
-rw-r--r-- | src/backends/cl/workloads/ClGatherWorkload.cpp | 9 | ||||
-rw-r--r-- | src/backends/cl/workloads/ClGatherWorkload.hpp | 3 |
4 files changed, 12 insertions, 7 deletions
diff --git a/src/backends/cl/ClLayerSupport.cpp b/src/backends/cl/ClLayerSupport.cpp index 44da423f92..0bff96345a 100644 --- a/src/backends/cl/ClLayerSupport.cpp +++ b/src/backends/cl/ClLayerSupport.cpp @@ -466,13 +466,15 @@ bool ClLayerSupport::IsFullyConnectedSupported(const TensorInfo& input, bool ClLayerSupport::IsGatherSupported(const TensorInfo& input0, const TensorInfo& input1, const TensorInfo& output, + const GatherDescriptor& descriptor, Optional<std::string&> reasonIfUnsupported) const { FORWARD_WORKLOAD_VALIDATE_FUNC(ClGatherWorkloadValidate, reasonIfUnsupported, input0, input1, - output); + output, + descriptor); } bool ClLayerSupport::IsGreaterSupported(const TensorInfo& input0, diff --git a/src/backends/cl/ClLayerSupport.hpp b/src/backends/cl/ClLayerSupport.hpp index d3c3295d2f..49100bf6a2 100644 --- a/src/backends/cl/ClLayerSupport.hpp +++ b/src/backends/cl/ClLayerSupport.hpp @@ -1,5 +1,5 @@ // -// Copyright © 2017 Arm Ltd. All rights reserved. +// Copyright © 2017 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #pragma once @@ -127,6 +127,7 @@ public: bool IsGatherSupported(const TensorInfo& input0, const TensorInfo& input1, const TensorInfo& output, + const GatherDescriptor& descriptor, Optional<std::string&> reasonIfUnsupported) const override; ARMNN_DEPRECATED_MSG("Use IsComparisonSupported instead") diff --git a/src/backends/cl/workloads/ClGatherWorkload.cpp b/src/backends/cl/workloads/ClGatherWorkload.cpp index 068487039b..c76b9c7a17 100644 --- a/src/backends/cl/workloads/ClGatherWorkload.cpp +++ b/src/backends/cl/workloads/ClGatherWorkload.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2020 Arm Ltd. All rights reserved. +// Copyright © 2020 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -14,13 +14,14 @@ namespace armnn { arm_compute::Status ClGatherWorkloadValidate(const TensorInfo& input, const TensorInfo& indices, - const TensorInfo& output) + const TensorInfo& output, + const GatherDescriptor& descriptor) { const arm_compute::TensorInfo aclInput = BuildArmComputeTensorInfo(input); const arm_compute::TensorInfo aclIndices = BuildArmComputeTensorInfo(indices); const arm_compute::TensorInfo aclOutput = BuildArmComputeTensorInfo(output); - int aclAxis = ComputeAclAxis(0, input); + int aclAxis = ComputeAclAxis(descriptor.m_Axis, input); return arm_compute::CLGather::validate(&aclInput, &aclIndices, &aclOutput, aclAxis); } @@ -35,7 +36,7 @@ ClGatherWorkload::ClGatherWorkload(const GatherQueueDescriptor& descriptor, arm_compute::ICLTensor& indices = static_cast<IClTensorHandle*>(m_Data.m_Inputs[1])->GetTensor(); arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor(); - int aclAxis = ComputeAclAxis(0, info.m_InputTensorInfos[0]); + int aclAxis = ComputeAclAxis(descriptor.m_Parameters.m_Axis, info.m_InputTensorInfos[0]); m_Layer.configure(&input, &indices, &output, aclAxis); }; diff --git a/src/backends/cl/workloads/ClGatherWorkload.hpp b/src/backends/cl/workloads/ClGatherWorkload.hpp index 5dbeaade59..df71a99fa0 100644 --- a/src/backends/cl/workloads/ClGatherWorkload.hpp +++ b/src/backends/cl/workloads/ClGatherWorkload.hpp @@ -13,7 +13,8 @@ namespace armnn { arm_compute::Status ClGatherWorkloadValidate(const TensorInfo& input, const TensorInfo& indices, - const TensorInfo& output); + const TensorInfo& output, + const GatherDescriptor& descriptor); class ClGatherWorkload : public BaseWorkload<GatherQueueDescriptor> { |