aboutsummaryrefslogtreecommitdiff
path: root/tests/ExecuteNetwork/FileComparisonExecutor.hpp
diff options
context:
space:
mode:
authorColm Donelan <colm.donelan@arm.com>2023-06-22 10:19:17 +0100
committerColm Donelan <colm.donelan@arm.com>2023-06-30 14:20:56 +0100
commit0dfb2658ce521571aa0f9e859f813c60fda9d8d6 (patch)
treeef4605cebb29c6754da8dfea0decd4250288e2a5 /tests/ExecuteNetwork/FileComparisonExecutor.hpp
parent16e27cf81424dcad05d129f9ba368a8c446cd25f (diff)
downloadarmnn-0dfb2658ce521571aa0f9e859f813c60fda9d8d6.tar.gz
IVGCVSW-7666 Add a FileComparisonExecutor to ExecuteNetwork.
* Implement the "-C" command line option of executenetwork. * Add a FileComparisonExecutorFile which will read tensors from a previously written text file and compare them to the execution output. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I8380fd263028af13d65a67fb6afd89626d1b07b8
Diffstat (limited to 'tests/ExecuteNetwork/FileComparisonExecutor.hpp')
-rw-r--r--tests/ExecuteNetwork/FileComparisonExecutor.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/ExecuteNetwork/FileComparisonExecutor.hpp b/tests/ExecuteNetwork/FileComparisonExecutor.hpp
new file mode 100644
index 0000000000..04e0339504
--- /dev/null
+++ b/tests/ExecuteNetwork/FileComparisonExecutor.hpp
@@ -0,0 +1,27 @@
+//
+// Copyright © 2023 Arm Ltd and Contributors. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#include "ExecuteNetworkProgramOptions.hpp"
+#include "IExecutor.hpp"
+
+class FileComparisonExecutor : public IExecutor
+{
+public:
+ FileComparisonExecutor(const ExecuteNetworkParams& params);
+ ~FileComparisonExecutor();
+ std::vector<const void*> Execute() override;
+ void PrintNetworkInfo() override;
+ void CompareAndPrintResult(std::vector<const void*> otherOutput) override;
+
+private:
+ // Disallow copy and assignment constructors.
+ FileComparisonExecutor(FileComparisonExecutor&);
+ FileComparisonExecutor operator=(const FileComparisonExecutor&);
+
+ ExecuteNetworkParams m_Params;
+ std::vector<armnn::OutputTensors> m_OutputTensorsVec;
+};