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 10:02:14 +0000
commit8e99252bc6edcf92703396d89ec91d05d62c161a (patch)
tree93bf62e58e62b6eccfd4fac12ebd011152d47168
parent082758c14ef0cddfb9cc87716f706d5917ddb62f (diff)
downloadarmnn-8e99252bc6edcf92703396d89ec91d05d62c161a.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 385d970dac..977e83f0f2 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++)
{