aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/npu_serialisation.py
diff options
context:
space:
mode:
authorJacob Bohlin <jacob.bohlin@arm.com>2020-08-13 13:24:59 +0200
committerJacob Bohlin <jacob.bohlin@arm.com>2020-11-04 08:57:06 +0100
commit268394d797db60d07eeace05a2c57e927da0ea15 (patch)
tree73e23e7b86b442367fcb4b529704e7889779ab2f /ethosu/vela/npu_serialisation.py
parent34359589655e62d0f2cadde53320de71add04e94 (diff)
downloadethos-u-vela-268394d797db60d07eeace05a2c57e927da0ea15.tar.gz
MLBEDSW-1974: Set Scratch buffers size
Set the actual size of the Scratch and Fast Scratch buffer and remove both Scratch buffers from the subgraph inputs. Signed-off-by: Jacob Bohlin <jacob.bohlin@arm.com> Change-Id: I9e4213f48289d9136cdd4cd43c668d37c6af8530
Diffstat (limited to 'ethosu/vela/npu_serialisation.py')
-rw-r--r--ethosu/vela/npu_serialisation.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/ethosu/vela/npu_serialisation.py b/ethosu/vela/npu_serialisation.py
index 7989fa90..0bd03001 100644
--- a/ethosu/vela/npu_serialisation.py
+++ b/ethosu/vela/npu_serialisation.py
@@ -103,11 +103,8 @@ def serialise_npu_subgraph_into_tensors(nng, sg, arch, scratch_tens, scratch_fas
sg.flash_tensor = make_memory_tensor(
sg.name + "_flash", flash_area, MemType.Permanent_CPU, flash_size, True, arch
)
- # Scratch fast tensor size set to 0. This forces a minimal allocation in the tensor arena
- # which causes a slot in the basep registers to be reserved, so that the scratch fast tensor
- # address can be overridden.
sg.scratch_fast_tensor = make_memory_tensor(
- sg.name + "_scratch_fast", scratch_fast_area, MemType.Scratch, 0, False, arch
+ sg.name + "_scratch_fast", scratch_fast_area, MemType.Scratch_fast, 0, False, arch
)
sg.scratch_fast_tensor.purpose = TensorPurpose.Scratch
else: