aboutsummaryrefslogtreecommitdiff
path: root/src/backends/cl/workloads/ClPermuteWorkload.cpp
diff options
context:
space:
mode:
authorMatthew Bentham <Matthew.Bentham@arm.com>2019-11-27 17:24:47 +0000
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-11-28 10:26:14 +0000
commit9820d3045f6d916b1a214d37dc9e140ea41bb324 (patch)
tree550a7f9aadc9073c65f94157062cf828391a88cf /src/backends/cl/workloads/ClPermuteWorkload.cpp
parent6d3d2055ca6d14d2220a5ea935fcc175712f923f (diff)
downloadarmnn-9820d3045f6d916b1a214d37dc9e140ea41bb324.tar.gz
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 <Matthew.Bentham@arm.com>
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..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,