IVGCVSW-6338 IMemoryOptimizerStrategy Create a wrapper validator strategy
* Add validator wrapper
* Add validation logic:
Condition #1: All Memblocks have been assigned to a MemBin
Condition #2: No Memblock is assigned to multiple MemBins
Condition #3: No two Memblocks overlap in both the X and Y axis
Memblocks can overlap on the X axis for
SingleAxisPacking
Memblocks can overlap on the Y axis or
the X for MultiAxisPacking but not both
* Add test strategies and tests for overlap, duplicates
and unassigned blocks
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Change-Id: I7a779b35538ecf18a33b62b84512eba69eda1f86
diff --git a/include/armnn/Types.hpp b/include/armnn/Types.hpp
index e713b89..02f265c 100644
--- a/include/armnn/Types.hpp
+++ b/include/armnn/Types.hpp
@@ -212,12 +212,12 @@
enum class MemBlockStrategyType
{
- // MemBlocks can be packed on the Y axis only.
+ // MemBlocks can be packed on the Y axis only, overlap allowed on X axis.
// In other words MemBlocks with overlapping lifetimes cannot use the same MemBin,
// equivalent to blob or pooling memory management.
SingleAxisPacking = 0,
- // MemBlocks can be packed on the Y and X axis.
+ // MemBlocks can be packed on either Y or X axis but cannot overlap on both.
// In other words MemBlocks with overlapping lifetimes can use the same MemBin,
// equivalent to offset or slab memory management.
MultiAxisPacking = 1