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
diff --git a/delegate/src/Convolution.hpp b/delegate/src/Convolution.hpp
index fed084e..2d9fdba 100644
--- a/delegate/src/Convolution.hpp
+++ b/delegate/src/Convolution.hpp
@@ -340,6 +340,13 @@
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 @@
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 =