diff options
author | Finn Williams <finn.williams@arm.com> | 2021-10-27 11:25:02 +0100 |
---|---|---|
committer | finn.williams <finn.williams@arm.com> | 2021-11-04 12:53:02 +0000 |
commit | f9d96e5a04810b4f1182b4c1b0f27601f6deb0dd (patch) | |
tree | 88f67fe9d0f91ebe500a7f771b2774d622dfa88b /tests/MemoryStrategyBenchmark/MemoryStrategyBenchmark.cpp | |
parent | 5095667f04d41801d5d6049b7dbd75b5d8f6013a (diff) | |
download | armnn-f9d96e5a04810b4f1182b4c1b0f27601f6deb0dd.tar.gz |
IVGCVSW-6303 Create a SingleAxisPacking strategy
* add fsrcnn and mobilebert memory profiles to the strategy benchmark
Signed-off-by: Finn Williams <finn.williams@arm.com>
Change-Id: Ibd8b26f2153c561e5c5bec477f6246d0e8ffa4af
Diffstat (limited to 'tests/MemoryStrategyBenchmark/MemoryStrategyBenchmark.cpp')
-rw-r--r-- | tests/MemoryStrategyBenchmark/MemoryStrategyBenchmark.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/MemoryStrategyBenchmark/MemoryStrategyBenchmark.cpp b/tests/MemoryStrategyBenchmark/MemoryStrategyBenchmark.cpp index 5924757f21..1ffb7f4867 100644 --- a/tests/MemoryStrategyBenchmark/MemoryStrategyBenchmark.cpp +++ b/tests/MemoryStrategyBenchmark/MemoryStrategyBenchmark.cpp @@ -18,9 +18,11 @@ std::vector<TestBlock> testBlocks { + {"fsrcnn", fsrcnn}, {"inceptionv4", inceptionv4}, {"deeplabv3", deeplabv3}, {"deepspeechv1", deepspeechv1}, + {"mobilebert", mobilebert}, {"ssd_mobilenetv2", ssd_mobilenetv2}, {"resnetv2", resnetv2}, {"yolov3",yolov3} @@ -36,9 +38,16 @@ void PrintModels() std::cout << "\n"; } -size_t GetMinPossibleMemorySize(const std::vector<armnn::MemBlock> blocks) +size_t GetMinPossibleMemorySize(const std::vector<armnn::MemBlock>& blocks) { - std::vector<size_t> lifetimes(1000); + unsigned int maxLifetime = 0; + for (auto& block: blocks) + { + maxLifetime = std::max(maxLifetime, block.m_EndOfLife); + } + maxLifetime++; + + std::vector<size_t> lifetimes(maxLifetime); for (const auto& block : blocks) { for (auto lifetime = block.m_StartOfLife; lifetime <= block.m_EndOfLife; ++lifetime) |