aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/optimizations/AddDebug.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn/optimizations/AddDebug.hpp')
-rw-r--r--src/armnn/optimizations/AddDebug.hpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/armnn/optimizations/AddDebug.hpp b/src/armnn/optimizations/AddDebug.hpp
index 60271b0d77..e0c79ae53f 100644
--- a/src/armnn/optimizations/AddDebug.hpp
+++ b/src/armnn/optimizations/AddDebug.hpp
@@ -22,7 +22,7 @@ public:
{
// if the inputs/outputs of this layer do not have a debug layer
// insert the debug layer after them
- InsertDebugLayerAfter(graph, layer);
+ InsertDebugLayerAfter(graph, layer, false);
}
}
@@ -31,7 +31,27 @@ protected:
~AddDebugImpl() = default;
};
+class AddDebugToFileImpl
+{
+public:
+
+ void Run(Graph& graph, Layer& layer) const
+ {
+ if (layer.GetType() != LayerType::Debug && layer.GetType() != LayerType::Output)
+ {
+ // if the inputs/outputs of this layer do not have a debug layer
+ // insert the debug layer after them
+ InsertDebugLayerAfter(graph, layer, true);
+ }
+ }
+
+protected:
+ AddDebugToFileImpl() = default;
+ ~AddDebugToFileImpl() = default;
+};
+
using InsertDebugLayer = OptimizeForType<Layer, AddDebugImpl>;
+using InsertDebugToFileLayer = OptimizeForType<Layer, AddDebugToFileImpl>;
} // namespace optimizations
} // namespace armnn