aboutsummaryrefslogtreecommitdiff
path: root/delegate/src/Convolution.hpp
diff options
context:
space:
mode:
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 =