diff options
author | Fredrik Svedberg <fredrik.svedberg@arm.com> | 2022-11-04 09:48:49 +0100 |
---|---|---|
committer | Fredrik Svedberg <fredrik.svedberg@arm.com> | 2022-11-09 20:33:19 +0000 |
commit | f3c7d557371b26835e3183064de58354f3a8b3cb (patch) | |
tree | ae6ab62e750f9b5c07ea4695380b4dfe06600999 /ethosu/vela/live_range.py | |
parent | 9d51ec41855a8be21bd0708c882d121e5bb5afcc (diff) | |
download | ethos-u-vela-f3c7d557371b26835e3183064de58354f3a8b3cb.tar.gz |
MLBEDSW-6881 SHAPE single op network is optimised to nothing3.6.0.rc1
Fixed by adding an operation to copy the statically optimised
data to the subgraph output.
Change-Id: Ica757e37d5460237973444ffd39c7d2850f319e3
Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com>
Diffstat (limited to 'ethosu/vela/live_range.py')
-rw-r--r-- | ethosu/vela/live_range.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ethosu/vela/live_range.py b/ethosu/vela/live_range.py index fbb48ecd..2829f398 100644 --- a/ethosu/vela/live_range.py +++ b/ethosu/vela/live_range.py @@ -240,11 +240,11 @@ def extract_live_ranges_from_cascaded_passes( rng = lr_graph.get_or_create_range(tens, cpu_tensor_alignment) rng.mark_usage(time_for_pass) - op_subgraph = cps.passes[0].ops[0].attrs.get("subgraph", None) - op_type = cps.passes[0].ops[0].type + op = cps.passes[0].ops[0] if cps.passes[0].ops else None + op_subgraph = op.attrs.get("subgraph", None) if op else None if op_subgraph is not None and MemType.Permanent_CPU not in target_mem_type_set: - if op_type == Op.CustomNpuOp: + if op.type == Op.CustomNpuOp: # If the primary-op is an NpuOp that means this is where an Npu subgraph # is called. Go into said subgraph and extract live ranges before continuing. # Use default allocation alignment of 16 for Npu tensors |