From 81beae3a870004795275e9266bc43d845b9f78db Mon Sep 17 00:00:00 2001 From: Matthew Sloyan Date: Tue, 13 Jul 2021 19:46:11 +0100 Subject: IVGCVSW-6119 ConstTensorsAsInput: FullyConnected * Constant weights and biases are now stored as Constant layers. * Updated Serializer, Deserializer and unit tests to reflect this. * Updated TfLiteDelegate, TfLiteParser and OnnxParser. * Updated Schema with IsConstant and ConstantTensorsAsInputs. * Updated Ref backend to handle constant weights and bias as inputs rather than reading from member variables. * Added dynamic or constant input EndToEnd tests. !android-nn-driver:5959 Signed-off-by: Matthew Sloyan Change-Id: Ibf3cf437df1100e4b322b0d303c575c6339f9696 --- src/armnnDeserializer/Deserializer.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/armnnDeserializer/Deserializer.hpp') diff --git a/src/armnnDeserializer/Deserializer.hpp b/src/armnnDeserializer/Deserializer.hpp index b1362c44b6..b4dc68b72d 100644 --- a/src/armnnDeserializer/Deserializer.hpp +++ b/src/armnnDeserializer/Deserializer.hpp @@ -143,9 +143,12 @@ private: void ParseTransposeConvolution2d(GraphPtr graph, unsigned int layerIndex); void ParseUnidirectionalSequenceLstm(GraphPtr graph, unsigned int layerIndex); - void RegisterInputSlots(GraphPtr graph, uint32_t layerIndex, - armnn::IConnectableLayer* layer); - void RegisterOutputSlots(GraphPtr graph, uint32_t layerIndex, + void RegisterInputSlots(GraphPtr graph, + uint32_t layerIndex, + armnn::IConnectableLayer* layer, + std::vector ignoreSlots = {}); + void RegisterOutputSlots(GraphPtr graph, + uint32_t layerIndex, armnn::IConnectableLayer* layer); // NOTE index here must be from flatbuffer object index property @@ -171,6 +174,9 @@ private: // Default values to zero for backward compatibility unsigned int m_WeightsLayoutScheme = 0; + + // Default values to zero for backward compatibility + unsigned int m_ConstTensorsAsInputs = 0; }; FeatureVersions GetFeatureVersions(GraphPtr graph); -- cgit v1.2.1