diff options
author | alered01 <Alex.Redshaw@arm.com> | 2020-05-07 14:58:29 +0100 |
---|---|---|
committer | Jan Eilers <jan.eilers@arm.com> | 2020-05-22 14:42:37 +0100 |
commit | 72b415674e7df9152a1e5d206b70e4d7a663f3fc (patch) | |
tree | bc5cf924de58f5c0a134bbe9304664d13b7f86a5 /include/armnn/utility/Timer.hpp | |
parent | f668f94de9a07d0bf488c10142a99c910f3b6640 (diff) | |
download | armnn-72b415674e7df9152a1e5d206b70e4d7a663f3fc.tar.gz |
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 <Alex.Redshaw@arm.com>
Change-Id: Ic739ff26e136e32aff9f0995217c1c3207008ca4
Diffstat (limited to 'include/armnn/utility/Timer.hpp')
-rw-r--r-- | include/armnn/utility/Timer.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
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 <chrono> +#include <iomanip> + +namespace armnn +{ + +inline std::chrono::high_resolution_clock::time_point GetTimeNow() +{ + return std::chrono::high_resolution_clock::now(); +} + +inline std::chrono::duration<double, std::milli> GetTimeDuration( + std::chrono::high_resolution_clock::time_point start_time) +{ + return std::chrono::duration<double, std::milli>(GetTimeNow() - start_time); +} + +}
\ No newline at end of file |