diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2020-08-14 11:51:12 +0100 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2020-08-16 14:47:00 +0000 |
commit | b8d771ac2e6f847a64b3b203591c5b1c3e198d3a (patch) | |
tree | 289b769e179e495e45f2d2c2f9374703be32f9c2 /src/armnn/test/GraphUtils.cpp | |
parent | 9e132f57e3fc9d1cd12e3bca2dd3eb82549d7d84 (diff) | |
download | armnn-b8d771ac2e6f847a64b3b203591c5b1c3e198d3a.tar.gz |
IVGCVSW-5012 Enable zero copy for Neon
* Allow memory import if padding is not required in Neon
* AddMockImportBackend for fallback tests
* Refactor GraphUtils
* Memory import unit tests
* Fallback unit tests
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: Ic2e141e12774bf6d915e77745b6f6d2d83d9b82d
Diffstat (limited to 'src/armnn/test/GraphUtils.cpp')
-rw-r--r-- | src/armnn/test/GraphUtils.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/armnn/test/GraphUtils.cpp b/src/armnn/test/GraphUtils.cpp index 36db900a2d..bc6b562c9d 100644 --- a/src/armnn/test/GraphUtils.cpp +++ b/src/armnn/test/GraphUtils.cpp @@ -63,3 +63,16 @@ bool IsConnected(armnn::Layer* srcLayer, armnn::Layer* destLayer, } return false; } + +/// Checks that first comes before second in the order. +bool CheckOrder(const armnn::Graph& graph, const armnn::Layer* first, const armnn::Layer* second) +{ + graph.Print(); + + const auto& order = graph.TopologicalSort(); + + auto firstPos = std::find(order.begin(), order.end(), first); + auto secondPos = std::find(firstPos, order.end(), second); + + return (secondPos != order.end()); +} |