aboutsummaryrefslogtreecommitdiff
path: root/src/backends/cl/workloads/ClPermuteWorkload.cpp
diff options
context:
space:
mode:
authorKevin May <kevin.may@arm.com>2019-12-12 17:28:05 +0000
committerKevin May <kevin.may@arm.com>2019-12-12 19:17:17 +0000
commit8ac5fc39b2556fd3ac0d0c43ebf55525bde97f58 (patch)
tree8fb4338647ef03e0dcbba3b6106967870f4d70c4 /src/backends/cl/workloads/ClPermuteWorkload.cpp
parente69fcc9ec42788218ba9693e53834b4606cf3882 (diff)
downloadarmnn-8ac5fc39b2556fd3ac0d0c43ebf55525bde97f58.tar.gz
IVGCVSW-4262 Use ACL Permute and Reshape Validate function in Neon and CL
!android-nn-driver:2465 Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: Ibabb73c0ae0df2e530a68398f75c76e6b80c0701
Diffstat (limited to 'src/backends/cl/workloads/ClPermuteWorkload.cpp')
-rw-r--r--src/backends/cl/workloads/ClPermuteWorkload.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backends/cl/workloads/ClPermuteWorkload.cpp b/src/backends/cl/workloads/ClPermuteWorkload.cpp
index bec80e55f8..41bce1d4fa 100644
--- a/src/backends/cl/workloads/ClPermuteWorkload.cpp
+++ b/src/backends/cl/workloads/ClPermuteWorkload.cpp
@@ -14,16 +14,16 @@
namespace armnn
{
-arm_compute::Status ClPermuteWorkloadValidate(const PermuteDescriptor& descriptor)
+arm_compute::Status ClPermuteWorkloadValidate(const TensorInfo& input,
+ const TensorInfo& output,
+ const PermuteDescriptor& descriptor)
{
- const armnn::PermutationVector& perm = descriptor.m_DimMappings;
+ const arm_compute::TensorInfo aclInputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(input);
+ const arm_compute::TensorInfo aclOutputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(output);
+ const armnn::PermutationVector& mappings = descriptor.m_DimMappings;
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(!perm.IsEqual({ 0U, 3U, 1U, 2U })
- && !perm.IsEqual({ 0U, 2U, 3U, 1U })
- && !perm.IsEqual({ 3U, 2U, 0U, 1U }),
- "Only [0, 3, 1, 2], [0, 2, 3, 1] and [3, 2, 0, 1] permutations are supported");
-
- return arm_compute::Status{};
+ return arm_compute::CLPermute::validate(&aclInputInfo, &aclOutputInfo,
+ armcomputetensorutils::BuildArmComputePermutationVector(mappings));
}
ClPermuteWorkload::ClPermuteWorkload(const PermuteQueueDescriptor& descriptor,