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
diff --git a/ethosu/vela/npu_serialisation.py b/ethosu/vela/npu_serialisation.py
index 7989fa9..0bd0300 100644
--- a/ethosu/vela/npu_serialisation.py
+++ b/ethosu/vela/npu_serialisation.py
@@ -103,11 +103,8 @@
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: