Age | Commit message (Collapse) | Author |
|
The subgraphs produced by SubgraphViewSelector were not deterministic
as the order of the input slots, outputs slots and layers within each
subgraph were determined by the pointer values of those objects, which
are not guaranteed to be the same for each execution.
This patch adds a post-processing sorting step based on the GUIDs of the
layers and the slot indices so that the results will be the same for
each execution.
This makes debugging the optimised graph much easier as subsequent
stages can also be deterministic.
Change-Id: Ifbcb199733066f99e9f95808a8da22023e5944f1
Signed-off-by: Rob Hughes <robert.hughes@arm.com>
|
|
* exchange boost::polymorphic_downcast with armnn::PolymorphicDowncast
* remove unnecessary includes of boost::polymorphic_downcast
Signed-off-by: Jan Eilers <jan.eilers@arm.com>
Change-Id: Ie603fb82860fe05fee547dc78073230cc62b2e1f
|
|
* Change boost assert to armnn assert
* Change include file to armnn assert
* Fix ARMNN_ASSERT_MSG issue with multiple conditions
* Change BOOST_ASSERT to BOOST_TEST where appropriate
* Remove unused include statements
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: I5d0fa3a37b7c1c921216de68f0073aa34702c9ff
|
|
!referencetests:229377
Signed-off-by: Jan Eilers <jan.eilers@arm.com>
Change-Id: Ia9b360b4a057fe7bbce5b268092627c09a0dba82
|
|
The current algorithm in SubgraphViewSelector has a bug that can lead to
it producing subgraphs which have a dependency cycle (see the newly
added test case 'ValidMerge' for a repro). It also fails to merge
subgraphs in some cases where it could, which leads to smaller subgraphs.
In the case of FSRCNN, the NPU cannot support these smaller subgraphs and
so this is blocking us from supporting that network.
This commit changes the algorithm to fix the dependency bug and
also make it so that subgraphs are merged in the cases that were missed
before. It also adds some unit tests to cover cases that were problematic
before, and to extend coverage for the new algorithm.
The new algorithm has two downsides compared to the previous one:
1. Disjoint subgraphs are not merged. This can never lead to a failed
compilation by the NPU and so I believe this is less of an issue than
the previous algorithm's "missed merges". This could however lead to a
runtime performance loss in some cases as the NPU will be unable
to parallelise as many operations. There are some unit tests that cover
this which I have disabled.
2. The performance is worse. I have spent some time analysing this and
for a graph with ~1000 layers the new algorithm takes 20ms vs. the
old algorithm's 4ms (on my desktop PC). I believe the performance is
still within acceptable limits. I also compared inception V3 (which was
the network which caused performance issues with the original version of
the splitting algorithm) and this new algorithm has not regressed there
(200-300us in both cases).
Change-Id: I1dd64a779f272723621e04d203b5a2752a6af2ef
Signed-off-by: Robert Hughes <robert.hughes@arm.com>
|
|
* Avoid collecting duplicate input/output slots during the
sub-graph selection process
* Fixes the InceptionV3 quantized run
Change-Id: I737ec8576d57184d3d25bda436a7776ec7243a0d
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
|
|
* Added OptimizeSubgraphViewTests file covering a number of
use cases for the Optimization API
* Fixed a bug in the sub-graph selector algorithm that skipped the
first layer in a sub-graph if it wasn't an input layer
* Changed the graph splitting logic to make use of maps instead of
unordered_maps to keep the split sub-graphs in consistent order
between executions
* Added more common unit test utils
* Minor fixes to comply to the include file conventions
Change-Id: Iad464eaedd004109e5ef41aa487cea3ad86177d3
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
|
|
Change-Id: I45f81aa4ca8a964e423594fe271825c4a52b21f4
Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
|
|
* Removed the reference to the parent graph in SubgraphView
* Removed the AddLayer method in SubgraphView
* Updated the code where necessary to adapt to the new changes in
SubgraphView
* Fixed a check in the CreatePreCompiledWorkloadTest test function
Change-Id: I4d3af87f11ec3cd8f18a21b250a2d295da56e1a0
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
|
|
Change-Id: Ie50aeccf053c20c3a01a75042bbc3acd824375af
Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
|