diff options
author | Samuel Panijel <samuel.panijel@arm.com> | 2021-06-10 13:40:03 +0300 |
---|---|---|
committer | tim.hall <tim.hall@arm.com> | 2021-07-05 11:01:19 +0000 |
commit | 6f4955aa7097b123bbf31aae4654547bb3e3c68c (patch) | |
tree | 72972b12a5e53743844bbc2d86c3fe50ae4fa425 /ethosu/vela/npu_serialisation.py | |
parent | b279844cae93353410210597535fdbf495cd0498 (diff) | |
download | ethos-u-vela-6f4955aa7097b123bbf31aae4654547bb3e3c68c.tar.gz |
MLBEDSW-3890 handling scratch tensor
vela: Possible issue with handling scratch tensor on non-ethosu custom op
Fixing a case where a tensor input name ends with "scratch".
4 test cases passing this change:
1) non-optimized tflite - input tensor name is _split_1_scratch
2) optimized tflite - input tensor name is _split_1_scratch
3) optimized tflite - input tensor name is _split_1_scratch and custom
operation name is non_ethus_u
4) non-optimized tflite - input tensor name is _split_1_scratch_fast
Change-Id: Ia515805825b7f9a646607c5075b7ea3a0cf6aad8
Signed-off-by: Samuel Panijel <samuel.panijel@arm.com>
Diffstat (limited to 'ethosu/vela/npu_serialisation.py')
-rw-r--r-- | ethosu/vela/npu_serialisation.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ethosu/vela/npu_serialisation.py b/ethosu/vela/npu_serialisation.py index f462168a..06ea61df 100644 --- a/ethosu/vela/npu_serialisation.py +++ b/ethosu/vela/npu_serialisation.py @@ -82,7 +82,7 @@ def serialise_npu_subgraph_into_tensors(sg, arch, scratch_tens, scratch_fast_ten sg.scratch_fast_tensor = make_memory_tensor( sg.name + "_scratch_fast", scratch_fast_area, MemType.Scratch_fast, 0, False, arch ) - sg.scratch_fast_tensor.purpose = TensorPurpose.Scratch + sg.scratch_fast_tensor.purpose = TensorPurpose.ScratchFast else: sg.scratch_tensor = scratch_tens sg.scratch_tensor.shape[0] += scratch_size |