diff options
author | Johan Alfven <johan.alfven@arm.com> | 2023-07-10 12:20:22 +0200 |
---|---|---|
committer | tim.hall <tim.hall@arm.com> | 2023-07-10 16:37:10 +0000 |
commit | 8df91f5b0ef5f270cbe848d8cebb5bf31ac4a088 (patch) | |
tree | aadb4225ccb402d9c34b9369d357ea2dbdc5728d /ethosu | |
parent | 52afbbbe7bdc1e501069166df881fef1357f74d7 (diff) | |
download | ethos-u-vela-8df91f5b0ef5f270cbe848d8cebb5bf31ac4a088.tar.gz |
MLBEDSW-7833: MLCE: Fixed output diff for reshape op
- In order to reduce memory usage, the live range mechanism have logic
to check if the ifm tensor can be reused for the ofm tensor for certain
operators
- In this failing test case, the input to the reshape/memcpy operator
has more than one consumer and this results in a faulty memory overwrite
since there are missing logic that should check the ifm consumers for
the memcpy operator
- The fix is to add the missing logic that ifm can only have one consumer
Change-Id: I2184c0f905b554f648c9732734098509e23b537c
Signed-off-by: Johan Alfven <johan.alfven@arm.com>
Diffstat (limited to 'ethosu')
-rw-r--r-- | ethosu/vela/live_range.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ethosu/vela/live_range.py b/ethosu/vela/live_range.py index 9f94dd63..0ccfc17a 100644 --- a/ethosu/vela/live_range.py +++ b/ethosu/vela/live_range.py @@ -208,8 +208,11 @@ def _get_ifm_to_fuse(sched_op, target_mem_area=None, target_mem_type_set=None): if not ( tensor_should_be_ignored(ifm, target_mem_area, target_mem_type_set) or tensor_should_be_ignored(ofm, target_mem_area, target_mem_type_set) + # input tensor only allowed to have one consumer + or len(ifm.consumer_list) > 1 ): # Currently DMA only used when bypassing memory only ops so ok to reuse ifm + # if ifm has only one consumer ifm_tens = ifm return ifm_tens |