aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeresa Charlin <teresa.charlinreyes@arm.com>2022-12-05 17:41:10 +0000
committerTeresaARM <teresa.charlinreyes@arm.com>2022-12-06 13:44:41 +0000
commit30dc2d2a1b0e9d3822abddc739dcb36cb672ea98 (patch)
treed46c935d211efb112ceea30e353c23f1a608271b
parent369d8fcd93213e37781a58fb9805a59bf14691db (diff)
downloadarmnn-30dc2d2a1b0e9d3822abddc739dcb36cb672ea98.tar.gz
Print BatchMatMul and Gather Descriptors on dot graph
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I01de14cd46fe614dfcb11b2b4f9323f32e01ee9d
-rw-r--r--src/armnn/SerializeLayerParameters.cpp17
-rw-r--r--src/armnn/SerializeLayerParameters.hpp12
2 files changed, 27 insertions, 2 deletions
diff --git a/src/armnn/SerializeLayerParameters.cpp b/src/armnn/SerializeLayerParameters.cpp
index d7f38034f5..209be48248 100644
--- a/src/armnn/SerializeLayerParameters.cpp
+++ b/src/armnn/SerializeLayerParameters.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd. All rights reserved.
+// Copyright © 2017,2022 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "SerializeLayerParameters.hpp"
@@ -26,6 +26,15 @@ void StringifyLayerParameters<BatchNormalizationDescriptor>::Serialize(Parameter
fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
}
+void StringifyLayerParameters<BatchMatMulDescriptor>::Serialize(ParameterStringifyFunction& fn,
+ const BatchMatMulDescriptor& desc)
+{
+ fn("TransposeX", (desc.m_TransposeX ? "true" : "false"));
+ fn("TransposeX", (desc.m_TransposeY ? "true" : "false"));
+ fn("AdjointX", (desc.m_AdjointX ? "true" : "false"));
+ fn("AdjointY", (desc.m_AdjointY ? "true" : "false"));
+}
+
void StringifyLayerParameters<BatchToSpaceNdDescriptor>::Serialize(ParameterStringifyFunction& fn,
const BatchToSpaceNdDescriptor& desc)
{
@@ -198,6 +207,12 @@ void StringifyLayerParameters<FullyConnectedDescriptor>::Serialize(ParameterStri
fn("TransposeWeightMatrix", (desc.m_TransposeWeightMatrix ? "true" : "false"));
}
+void StringifyLayerParameters<GatherDescriptor>::Serialize(ParameterStringifyFunction& fn,
+ const GatherDescriptor& desc)
+{
+ fn("Axis", std::to_string(desc.m_Axis));
+}
+
void StringifyLayerParameters<L2NormalizationDescriptor>::Serialize(ParameterStringifyFunction& fn,
const L2NormalizationDescriptor& desc)
{
diff --git a/src/armnn/SerializeLayerParameters.hpp b/src/armnn/SerializeLayerParameters.hpp
index d2c7d76d7d..b786c53882 100644
--- a/src/armnn/SerializeLayerParameters.hpp
+++ b/src/armnn/SerializeLayerParameters.hpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd. All rights reserved.
+// Copyright © 2017,2022 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
@@ -35,6 +35,11 @@ template <> struct StringifyLayerParameters<BatchNormalizationDescriptor>
static void Serialize(ParameterStringifyFunction& fn, const BatchNormalizationDescriptor& desc);
};
+template <> struct StringifyLayerParameters<BatchMatMulDescriptor>
+{
+ static void Serialize(ParameterStringifyFunction& fn, const BatchMatMulDescriptor& desc);
+};
+
template <> struct StringifyLayerParameters<BatchToSpaceNdDescriptor>
{
static void Serialize(ParameterStringifyFunction& fn, const BatchToSpaceNdDescriptor& desc);
@@ -85,6 +90,11 @@ template <> struct StringifyLayerParameters<FullyConnectedDescriptor>
static void Serialize(ParameterStringifyFunction& fn, const FullyConnectedDescriptor& desc);
};
+template <> struct StringifyLayerParameters<GatherDescriptor>
+{
+ static void Serialize(ParameterStringifyFunction& fn, const GatherDescriptor& desc);
+};
+
template <> struct StringifyLayerParameters<L2NormalizationDescriptor>
{
static void Serialize(ParameterStringifyFunction& fn, const L2NormalizationDescriptor& desc);