diff options
author | Johan Alfven <johan.alfven@arm.com> | 2024-04-22 15:17:33 +0200 |
---|---|---|
committer | Johan Alfven <johan.alfven@arm.com> | 2024-04-24 11:08:45 +0200 |
commit | f9194e11b2d2f1e813e347cad2d863a26115fa7e (patch) | |
tree | 19dec5959033722820a9d4bb4f075764d8d8896e | |
parent | bab7f28a65a0bf940b0cc61be48bbe478dde51f7 (diff) | |
download | ethos-u-vela-f9194e11b2d2f1e813e347cad2d863a26115fa7e.tar.gz |
MLBEDSW-8973: MLCE: Fix assert in build pass links
- Assert in build pass links due to that a concat
op is split into several avg pools op which run in different
custom ops. The code did not expected the pass to have a
dependency to itself.
- Fixed the assert to handle this special case
Change-Id: Id03b1145b19c25bf967a1061aa5ecf559b3bc1cc
Signed-off-by: Johan Alfven <johan.alfven@arm.com>
-rw-r--r-- | ethosu/vela/nn_graph.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ethosu/vela/nn_graph.py b/ethosu/vela/nn_graph.py index 3c87f9b..b9eee28 100644 --- a/ethosu/vela/nn_graph.py +++ b/ethosu/vela/nn_graph.py @@ -253,7 +253,10 @@ class Subgraph: for tens in ps.inputs: for op in tens.ops: pred_pass = op.scheduled_pass - assert pred_pass.time < ps.time + # Pass with split concat ops may end up with a dependency to + # itself since output from concat is produced by several avg pool ops. + # Hence pred_pass can be equal to ps. + assert pred_pass == ps or pred_pass.time < ps.time if ps not in pred_pass.successors: pred_pass.successors.append(ps) |