MLCE-1092 Added layerNames to opaque delegate
* All layers added through the opaque delegate will have a name that
includes the nodeIndex from the tflite model.
* Added utilities to OpaqueDelegateUtils to get the names for the layers.
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Change-Id: Iadcc21646d0b6fcc2c524d6239211ad3af6b6577
diff --git a/delegate/opaque/src/Unpack.hpp b/delegate/opaque/src/Unpack.hpp
index 9b87bf7..0956d16 100644
--- a/delegate/opaque/src/Unpack.hpp
+++ b/delegate/opaque/src/Unpack.hpp
@@ -187,10 +187,9 @@
return isSupported ? kTfLiteOk : kTfLiteError;
};
- std::string splitterLayerName("Unpack Splitter");
-
+ auto layerName = GetName(armnn::LayerType::Splitter, nodeIndex, "Unpack");
armnn::IConnectableLayer* splitterLayer = delegateData.m_Network->AddSplitterLayer(splitDesc,
- splitterLayerName.c_str());
+ layerName.c_str());
splitterLayer->SetBackendId(setBackendSplit);
ARMNN_ASSERT(splitterLayer != nullptr);
@@ -206,7 +205,7 @@
// Create reshape to remove the unpacked dimension for unpack operator of each output from Splitter.
for (unsigned int outputIndex = 0; outputIndex < splitterLayer->GetNumOutputSlots(); ++outputIndex)
{
- std::string reshapeLayerName("Unpack Reshape");
+ auto reshapeLayerName = GetName(armnn::LayerType::Reshape, nodeIndex, "Unpack");
armnn::IConnectableLayer* reshapeLayer = delegateData.m_Network->AddReshapeLayer(reshapeDescriptor,
reshapeLayerName.c_str());
reshapeLayer->SetBackendId(setBackendReshape);