From 9820d3045f6d916b1a214d37dc9e140ea41bb324 Mon Sep 17 00:00:00 2001 From: Matthew Bentham Date: Wed, 27 Nov 2019 17:24:47 +0000 Subject: MLCE-115 Remove redundant error checking in CL backend This stuff is handled in CLPerumuteLayer::validate now Change-Id: I552e7c0bbd1557d6b5e217c1e96aaeb2377accbd Signed-off-by: Matthew Bentham --- src/backends/cl/workloads/ClPermuteWorkload.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/backends/cl/workloads/ClPermuteWorkload.cpp') diff --git a/src/backends/cl/workloads/ClPermuteWorkload.cpp b/src/backends/cl/workloads/ClPermuteWorkload.cpp index bec80e55f8..dd495c8288 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, -- cgit v1.2.1