aboutsummaryrefslogtreecommitdiff
path: root/delegate/src/Convolution.hpp
diff options
context:
space:
mode:
authorNarumol Prangnawarat <narumol.prangnawarat@arm.com>2020-11-20 16:17:48 +0000
committerFrancis Murtagh <francis.murtagh@arm.com>2020-11-20 18:06:44 +0000
commit8c2f651ad454d11dd36e212560af23dbea5b758e (patch)
tree1b5d6134d1242a40d2396db3304525bccbe17700 /delegate/src/Convolution.hpp
parent4f55a25217f679205bd39587a26f2a2d1866cb67 (diff)
downloadarmnn-8c2f651ad454d11dd36e212560af23dbea5b758e.tar.gz
IVGCVSW-5538 Fix delegate DepthwiseConv2d, DIV, Reshape
* Correct filter shape for DepthwiseConv2d * Remove non-support data type * Allow check for flatten on Reshape Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Ic4be63d7c2f3a2b5e13a1530025a49464c21171b
Diffstat (limited to 'delegate/src/Convolution.hpp')
-rw-r--r--delegate/src/Convolution.hpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/delegate/src/Convolution.hpp b/delegate/src/Convolution.hpp
index fed084e3a9..2d9fdba122 100644
--- a/delegate/src/Convolution.hpp
+++ b/delegate/src/Convolution.hpp
@@ -340,6 +340,13 @@ TfLiteStatus VisitDepthwiseConv2dOperator(DelegateData& delegateData,
biasTensorInfo = armnn::TensorInfo(armnn::TensorShape({1}), GetDataType(tfLiteInputTensor));
}
+ std::vector<uint8_t> swizzledData(filterTensorInfo.GetNumBytes());
+ auto filter =
+ CreateConstTensor(&tfLiteFilterTensor,
+ filterTensorInfo,
+ armnn::Optional<armnn::PermutationVector&>(permutationVector),
+ swizzledData.data());
+
if (!delegateData.m_Network)
{
bool isSupported = false;
@@ -351,18 +358,13 @@ TfLiteStatus VisitDepthwiseConv2dOperator(DelegateData& delegateData,
inputTensorInfo,
outputTensorInfo,
descriptor,
- filterTensorInfo,
+ filter.GetInfo(),
armnn::Optional<armnn::TensorInfo>(biasTensorInfo));
return isSupported ? kTfLiteOk : kTfLiteError;
}
armnn::IConnectableLayer* layer = nullptr;
- std::vector<uint8_t> swizzledData(filterTensorInfo.GetNumBytes());
- auto filter =
- CreateConstTensor(&tfLiteFilterTensor,
- filterTensorInfo,
- armnn::Optional<armnn::PermutationVector&>(permutationVector),
- swizzledData.data());
+
if(biasEnabled)
{
auto biases =