diff options
author | Keith Davis <keith.davis@arm.com> | 2022-10-14 15:50:33 +0100 |
---|---|---|
committer | KeithARM <keith.davis@arm.com> | 2022-10-19 10:33:40 +0000 |
commit | 15f9c68adef324cd0158cea3d021c0f6bef5eecf (patch) | |
tree | 1cd48b345d182fd19efdc40a32e2540befd8f925 /src/armnn/optimizations/AddDebug.hpp | |
parent | 7bbf56598010041ea46c3fa9d32604db777ee26e (diff) | |
download | armnn-15f9c68adef324cd0158cea3d021c0f6bef5eecf.tar.gz |
MLCE-545 INT8 TFLite model execution abnormal
* Add functionality to print output tensors to file in tempdir
* UnitTests
Signed-off-by: Keith Davis <keith.davis@arm.com>
Change-Id: Idfb4c186544187db1fecdfca11c662540f645439
Diffstat (limited to 'src/armnn/optimizations/AddDebug.hpp')
-rw-r--r-- | src/armnn/optimizations/AddDebug.hpp | 22 |
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 |