MLCE-86 Reversing the pad list in the ClPadValidate function similarly to whats done...
authorÉanna Ó Catháin <eanna.ocathain@arm.com>
Mon, 14 Jan 2019 15:50:08 +0000 (15:50 +0000)
committerÉanna Ó Catháin <eanna.ocathain@arm.com>
Mon, 14 Jan 2019 15:50:08 +0000 (15:50 +0000)
Change-Id: I9488cebd63767c0c51d9ee6333d5aaf0e4a85847

src/backends/cl/workloads/ClPadWorkload.cpp

index 4d55493..8fd62f2 100644 (file)
@@ -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<arm_compute::PaddingList>(descriptor.m_PadList);
+
+    std::vector<std::pair<unsigned int, unsigned int>> 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<arm_compute::PaddingList>(reversed_PadList);
 
     const arm_compute::Status aclStatus = arm_compute::CLPadLayer::validate(&aclInputInfo,
                                                                             &aclOutputInfo,