aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/register_command_stream_generator.py
diff options
context:
space:
mode:
authorTim Hall <tim.hall@arm.com>2022-05-19 12:36:58 +0100
committertim.hall <tim.hall@arm.com>2022-05-19 15:56:19 +0000
commitcda4fcb0fd3e9766a161cf3e5aa7c3283e7f7c9e (patch)
tree2ca560bcf290bf88ab7a0058098df794486ab528 /ethosu/vela/register_command_stream_generator.py
parent8bc7a652607a771e234fda6b05275542ff0fc072 (diff)
downloadethos-u-vela-3.4.0.rc2.tar.gz
MLBEDSW-6563: networks failing with memory area exceeded in vela3.4.0.rc2
- For allocations that have a hard memory limit the Hill Climb allocator should be given more attempts to find a solution that would fit - The fix is to use a memory limit when there is a hard constraint, and a minimum iteration count, reset on every improvement, when there is a soft constraint - Added maximum number iterations CLI option Signed-off-by: Tim Hall <tim.hall@arm.com> Change-Id: I19ff53a0b68412de280263626778a3102cbe52fa
Diffstat (limited to 'ethosu/vela/register_command_stream_generator.py')
-rw-r--r--ethosu/vela/register_command_stream_generator.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/ethosu/vela/register_command_stream_generator.py b/ethosu/vela/register_command_stream_generator.py
index 0e68b140..2bdfda20 100644
--- a/ethosu/vela/register_command_stream_generator.py
+++ b/ethosu/vela/register_command_stream_generator.py
@@ -151,7 +151,7 @@ class CommandStreamEmitter:
payload_mode = CmdMode(code & CmdMode.Mask)
- s = f"0x{offset:06x}:"
+ s = f"{offset:#08x}:"
if payload_mode == CmdMode.NoPayload:
s += f" {'':8}"
@@ -291,7 +291,11 @@ def check_mem_limits(memory_accesses: MemoryAccessSet, mem_limits: Dict[int, int
if offset < 0:
raise VelaError(f"Negative address offset: {offset}, region: {region}")
if offset > max:
- raise VelaError(f"Address offset out of range: {offset}, region: {region}, max: {max}")
+ raise VelaError(
+ f"Address offset out of range: {offset}, region: {region}, max: {max}. Perhaps try running"
+ f" with the HillClimb tensor allocator and/or increasing the maximum iteration of that"
+ f" allocator"
+ )
def quantise(value: float, quant: Optional[NpuQuantization]) -> int: