diff options
author | Rob Hughes <robert.hughes@arm.com> | 2020-08-28 11:48:35 +0100 |
---|---|---|
committer | TeresaARM <teresa.charlinreyes@arm.com> | 2020-10-01 12:50:50 +0000 |
commit | b17220d7323a7ece19e8cc16839491984848bf44 (patch) | |
tree | 239c83d5efa4c15ff8f9bed7d1e225ca0c73a920 | |
parent | a2a512c60e852a82b9d1e85bb7b8874723dda161 (diff) | |
download | armnn-b17220d7323a7ece19e8cc16839491984848bf44.tar.gz |
Include layer GUID in SerializeToDot output
Change-Id: I1a6df60683cc51fcd9739b6dc98f1e722becf045
Signed-off-by: Robert Hughes <robert.hughes@arm.com>
-rw-r--r-- | src/armnn/Layer.cpp | 5 | ||||
-rw-r--r-- | src/backends/backendsCommon/test/OptimizedNetworkTests.cpp | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/armnn/Layer.cpp b/src/armnn/Layer.cpp index 2256e48c91..c8d5a1690d 100644 --- a/src/armnn/Layer.cpp +++ b/src/armnn/Layer.cpp @@ -445,8 +445,13 @@ void Layer::VerifyShapeInferenceType(const TensorShape& outputShape, ShapeInfere void Layer::SerializeLayerParameters(ParameterStringifyFunction& fn) const { + std::string guid = std::to_string(m_Guid); std::string layerType = GetLayerTypeAsCString(m_Type); std::string backendId = std::string(m_BackendId); + if (!(guid.compare("") == 0) && !guid.empty()) + { + fn("Guid", guid); + } if(!(m_LayerName.compare("") == 0) && !m_LayerName.empty()) { fn("LayerName",m_LayerName); diff --git a/src/backends/backendsCommon/test/OptimizedNetworkTests.cpp b/src/backends/backendsCommon/test/OptimizedNetworkTests.cpp index c8986f5d4d..721dfb004c 100644 --- a/src/backends/backendsCommon/test/OptimizedNetworkTests.cpp +++ b/src/backends/backendsCommon/test/OptimizedNetworkTests.cpp @@ -50,9 +50,12 @@ BOOST_AUTO_TEST_CASE(SerializeToDot) "digraph Optimized {\n" " node [shape=\"record\"];\n" " edge [fontsize=8 fontcolor=\"blue\" fontname=\"arial-bold\"];\n" - " " << inputId << " [label=\"{Input|LayerType : Input\\lBackendID : CpuRef\\l}\"];\n" - " " << addId << " [label=\"{Addition|LayerType : Addition\\lBackendID : CpuRef\\l}\"];\n" - " " << outputId << " [label=\"{Output|LayerType : Output\\lBackendID : CpuRef\\l}\"];\n" + " " << inputId << " [label=\"{Input|Guid : " << inputId << "\\lLayerType : Input\\l" + "BackendID : CpuRef\\l}\"];\n" + " " << addId << " [label=\"{Addition|Guid : " << addId << "\\lLayerType : Addition\\l" + "BackendID : CpuRef\\l}\"];\n" + " " << outputId << " [label=\"{Output|Guid : " << outputId << "\\lLayerType : Output\\l" + "BackendID : CpuRef\\l}\"];\n" " " << inputId << " -> " << addId << " [label=< [4] >];\n" " " << inputId << " -> " << addId << " [label=< [4] >];\n" " " << addId << " -> " << outputId << " [label=< [4] >];\n" |