aboutsummaryrefslogtreecommitdiff
path: root/delegate/src/DelegateUtils.hpp
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2021-10-13 21:20:07 +0100
committerMatthew Sloyan <matthew.sloyan@arm.com>2021-11-01 12:09:27 +0000
commit4b2f34709be018d6cf9931b66deaf84a4469340d (patch)
tree2320ebf3ee3aeb91b91fb55de16504bd80f6f3a3 /delegate/src/DelegateUtils.hpp
parent9f6862de94e3d15ea5207a5747012f6c7eead358 (diff)
downloadarmnn-4b2f34709be018d6cf9931b66deaf84a4469340d.tar.gz
IVGCVSW-6457 Add FLOOR_DIV Support to the TfLiteDelegate
Change-Id: Ia4bf42b1f3f86b947825dff8e538d2d4343effab Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'delegate/src/DelegateUtils.hpp')
-rw-r--r--delegate/src/DelegateUtils.hpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/delegate/src/DelegateUtils.hpp b/delegate/src/DelegateUtils.hpp
index 45174458aa..940d269c5b 100644
--- a/delegate/src/DelegateUtils.hpp
+++ b/delegate/src/DelegateUtils.hpp
@@ -595,7 +595,7 @@ TfLiteStatus ProcessInputs(armnn::IConnectableLayer* layer,
for (unsigned int inputIndex = 0; inputIndex < layer->GetNumInputSlots(); ++inputIndex)
{
const TfLiteTensor& tfLiteInputTensor = tfLiteTensors[tfLiteNode->inputs->data[inputIndex]];
- if(tflite::IsConstantTensor(&tfLiteInputTensor))
+ if (tflite::IsConstantTensor(&tfLiteInputTensor))
{
armnn::TensorInfo inputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteInputTensor);
bool isSupported = false;
@@ -618,7 +618,6 @@ TfLiteStatus ProcessInputs(armnn::IConnectableLayer* layer,
delegateData.m_OutputSlotForNode[tfLiteNode->inputs->data[inputIndex]] = &outputSlot;
}
-
}
return kTfLiteOk;
}
@@ -633,4 +632,13 @@ unsigned int ComputeWrappedIndex(int index, unsigned int numDimensions)
return static_cast<unsigned int>(wrappedIndex);
};
+bool AreAllSigned32(const armnn::TensorInfo& inputInfo1,
+ const armnn::TensorInfo& inputInfo2,
+ const armnn::TensorInfo& outputInfo)
+{
+ return (armnn::DataType::Signed32 == inputInfo1.GetDataType()) &&
+ (armnn::DataType::Signed32 == inputInfo2.GetDataType()) &&
+ (armnn::DataType::Signed32 == outputInfo.GetDataType());
+}
+
} // namespace anonymous