aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeresa Charlin <teresa.charlinreyes@arm.com>2019-12-18 22:10:47 +0000
committerKevin May <kevin.may@arm.com>2019-12-19 09:06:14 +0000
commit77707452ce461a67c27f54ecf4e340759acf834f (patch)
tree6209e81bb718ce64d57074ede1d13b313aae19b4
parent81de98e44f2dbf56f445660be99cd5736c5d3096 (diff)
downloadarmnn-77707452ce461a67c27f54ecf4e340759acf834f.tar.gz
IVGCVSW-4302 Depthwise CTS. Fix ReorderWeightChannelsForAcl.
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I8d2050f4478fe9d9cdf9e374b8906827cc769689
-rw-r--r--src/backends/backendsCommon/WorkloadUtils.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/backends/backendsCommon/WorkloadUtils.cpp b/src/backends/backendsCommon/WorkloadUtils.cpp
index 3abadd7563..abb704e80a 100644
--- a/src/backends/backendsCommon/WorkloadUtils.cpp
+++ b/src/backends/backendsCommon/WorkloadUtils.cpp
@@ -86,17 +86,12 @@ ConstTensor ReorderWeightChannelsForAcl(const ConstTensor& weightHandle, DataLay
unsigned int destinationWeightsChannel;
unsigned int totalChannels = inputChannels * multiplier;
unsigned int channelSize = height * width;
+ unsigned int inputChannel = 0;
for (unsigned int originWeightsChannel = 0; originWeightsChannel < totalChannels; originWeightsChannel++)
{
- if (originWeightsChannel % inputChannels == 0)
- {
- destinationWeightsChannel = originWeightsChannel / inputChannels;
- }
- else
- {
- destinationWeightsChannel = (originWeightsChannel - 1) / inputChannels + multiplier;
- }
+ inputChannel = originWeightsChannel % inputChannels;
+ destinationWeightsChannel = (originWeightsChannel - inputChannel) / inputChannels + multiplier * inputChannel;
for (unsigned int i = 0; i < channelSize; i++)
{