From a7227ac8fa45c9ea0da0e1ed66bb0c551c61095b Mon Sep 17 00:00:00 2001 From: alered01 Date: Thu, 7 May 2020 14:58:29 +0100 Subject: Adding more performance metrics * Implemented CLTuning flow for ExecuteNetwork tests * Added --tuning-path to specify tuning file to use/create * Added --tuning-level to specify tuning level to use as well as enable extra tuning run to generate the tuning file * Fixed issue where TuningLevel was being parsed incorrectly * Added measurements for initialization, network parsing, network optimization, tuning, and shutdown * Added flag to control number of iterations inference is run for Signed-off-by: alered01 Change-Id: Ic739ff26e136e32aff9f0995217c1c3207008ca4 --- include/armnn/utility/Timer.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 include/armnn/utility/Timer.hpp (limited to 'include/armnn') diff --git a/include/armnn/utility/Timer.hpp b/include/armnn/utility/Timer.hpp new file mode 100644 index 0000000000..daf689e74f --- /dev/null +++ b/include/armnn/utility/Timer.hpp @@ -0,0 +1,25 @@ +// +// Copyright © 2020 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include +#include + +namespace armnn +{ + +inline std::chrono::high_resolution_clock::time_point GetTimeNow() +{ + return std::chrono::high_resolution_clock::now(); +} + +inline std::chrono::duration GetTimeDuration( + std::chrono::high_resolution_clock::time_point start_time) +{ + return std::chrono::duration(GetTimeNow() - start_time); +} + +} \ No newline at end of file -- cgit v1.2.1