diff options
author | Francis Murtagh <francis.murtagh@arm.com> | 2020-05-22 12:49:25 +0100 |
---|---|---|
committer | Jan Eilers <jan.eilers@arm.com> | 2020-05-22 16:14:11 +0000 |
commit | d36c5288f1a87bcd4a100be413132d61305cb545 (patch) | |
tree | ff45e6c4ceaf9d97ed6c5c6398e19fd290f74af4 /src | |
parent | 753560b55dbf6656389b95efc8d4df07ac43cc9a (diff) | |
download | armnn-d36c5288f1a87bcd4a100be413132d61305cb545.tar.gz |
Bugfix: Profiling use of substr() incorrectly parses semantic versioning
* With semantic versioning ARMNN_VERSION is changed from 20200500 to 21.0.0
causing this function to return "Armnn .0..0" instead of "Armnn 20.1"
* Remove the use of substrings and instead use the Major/Minor macros to
give the expected output format: "Armnn 21.0" compared to last release's
"Armnn 20.02"
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Change-Id: Id255ff154f59e922434f72a68563ccc6126e187a
Diffstat (limited to 'src')
-rw-r--r-- | src/profiling/ProfilingUtils.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/profiling/ProfilingUtils.cpp b/src/profiling/ProfilingUtils.cpp index 4e5fcf8e1a..f151dd6e4a 100644 --- a/src/profiling/ProfilingUtils.cpp +++ b/src/profiling/ProfilingUtils.cpp @@ -284,8 +284,7 @@ std::string GetHardwareVersion() std::string GetSoftwareVersion() { - std::string armnnVersion(ARMNN_VERSION); - std::string result = "Armnn " + armnnVersion.substr(2,2) + "." + armnnVersion.substr(4,2); + std::string result = "Armnn " + std::to_string(ARMNN_MAJOR_VERSION) + "." + std::to_string(ARMNN_MINOR_VERSION); return result; } |