From d0a1608e2c41639d8f3e3f9305d79c5f92c9cff8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=89anna=20=C3=93=20Cath=C3=A1in?= Date: Mon, 14 Jan 2019 15:50:08 +0000 Subject: [PATCH] MLCE-86 Reversing the pad list in the ClPadValidate function similarly to whats done in the constructor. Change-Id: I9488cebd63767c0c51d9ee6333d5aaf0e4a85847 --- src/backends/cl/workloads/ClPadWorkload.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/backends/cl/workloads/ClPadWorkload.cpp b/src/backends/cl/workloads/ClPadWorkload.cpp index 4d55493..8fd62f2 100644 --- a/src/backends/cl/workloads/ClPadWorkload.cpp +++ b/src/backends/cl/workloads/ClPadWorkload.cpp @@ -46,7 +46,14 @@ arm_compute::Status ClPadValidate(const TensorInfo& input, { const arm_compute::TensorInfo aclInputInfo = BuildArmComputeTensorInfo(input); const arm_compute::TensorInfo aclOutputInfo = BuildArmComputeTensorInfo(output); - arm_compute::PaddingList padList = static_cast(descriptor.m_PadList); + + std::vector> reversed_PadList(descriptor.m_PadList.size()); + + std::reverse_copy(std::begin(descriptor.m_PadList), + std::end(descriptor.m_PadList), + std::begin(reversed_PadList)); + + arm_compute::PaddingList padList = static_cast(reversed_PadList); const arm_compute::Status aclStatus = arm_compute::CLPadLayer::validate(&aclInputInfo, &aclOutputInfo, -- 2.7.4