diff options
author | Teresa Charlin <teresa.charlinreyes@arm.com> | 2023-03-28 11:00:36 +0100 |
---|---|---|
committer | Nikhil Raj Arm <nikhil.raj@arm.com> | 2023-04-11 14:14:52 +0000 |
commit | ca5c82af9269e7fd7ed17c7df9780a75fdaa733e (patch) | |
tree | f09478cebb90603a4afc29acf30d2d59475b152f /src/backends/aclCommon | |
parent | 65c21a1eeff32f3abf91c3a638252ceb1ae5c51e (diff) | |
download | armnn-ca5c82af9269e7fd7ed17c7df9780a75fdaa733e.tar.gz |
IVGCVSW-7507 Pass m_Crops in BatchToSpaceND CpuAcc and GpuAcc workloads
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: I902c9187eefe7595271312fdc16273f7aa3d41cd
Diffstat (limited to 'src/backends/aclCommon')
-rw-r--r-- | src/backends/aclCommon/ArmComputeTensorUtils.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/backends/aclCommon/ArmComputeTensorUtils.hpp b/src/backends/aclCommon/ArmComputeTensorUtils.hpp index 1f07fa949c..0c2ff878e1 100644 --- a/src/backends/aclCommon/ArmComputeTensorUtils.hpp +++ b/src/backends/aclCommon/ArmComputeTensorUtils.hpp @@ -108,7 +108,7 @@ unsigned int ComputeDepthwiseConv2dDepthMultiplier(armnn::DataLayout layout, const arm_compute::TensorShape& weightsShape, const arm_compute::TensorShape& inputShape); -/// Utility function used to setup an arm_compute::PadStrideInfo object from an armnn layer descriptor. +/// Utility function used to setup an arm_compute::PadStrideInfo object from an ArmNN layer descriptor. template <typename Descriptor> arm_compute::PadStrideInfo BuildArmComputePadStrideInfo(const Descriptor &descriptor) { @@ -121,6 +121,14 @@ arm_compute::PadStrideInfo BuildArmComputePadStrideInfo(const Descriptor &descri arm_compute::DimensionRoundingType::FLOOR); } +/// Utility function used to setup an arm_compute::CropInfo object from an ArmNN layer descriptor. +template <typename Descriptor> +arm_compute::CropInfo BuildArmComputeCropInfo(const Descriptor& descriptor) +{ + return arm_compute::CropInfo(descriptor.m_Crops[1].first, descriptor.m_Crops[1].second, + descriptor.m_Crops[0].first, descriptor.m_Crops[0].second); +} + /// Sets up the given ArmCompute tensor's dimensions based on the given ArmNN tensor. template <typename Tensor> void BuildArmComputeTensor(Tensor& tensor, const armnn::TensorInfo& tensorInfo) |