diff options
author | Johan Alfven <johan.alfven@arm.com> | 2023-02-28 09:03:03 +0100 |
---|---|---|
committer | Fredrik Svedberg <fredrik.svedberg@arm.com> | 2023-03-13 08:40:35 +0000 |
commit | 6e281afe19ea0cd9dba2cecfb73050c18f29d242 (patch) | |
tree | 7741feb7a6ac2f5d7822be8dc46b43f0589aca53 /ethosu/vela/live_range.py | |
parent | c72cac8e8beb6bd52bdf6a41e6f7182b5167ee5d (diff) | |
download | ethos-u-vela-6e281afe19ea0cd9dba2cecfb73050c18f29d242.tar.gz |
MLBEDSW-7393: MLCE: Optimize compile time for large networks
- There is a problem with large networks containing many NPU
subgraphs. The scheduling takes too long time since the snapshot
memory calculation is always doing a complete update for the
full graph.
- A complete run is needed in the end to calculate all the
time indexes correctly. However, when scheduling a NPU subgraph
it is enough to extract live ranges for the current schedule
and its operators.
Change-Id: Iccb7d6728119c1428ad0b45a2ac34e92158c15bd
Signed-off-by: Johan Alfven <johan.alfven@arm.com>
Diffstat (limited to 'ethosu/vela/live_range.py')
-rw-r--r-- | ethosu/vela/live_range.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/vela/live_range.py b/ethosu/vela/live_range.py index 6a2a04ac..05e481e0 100644 --- a/ethosu/vela/live_range.py +++ b/ethosu/vela/live_range.py @@ -251,7 +251,7 @@ def extract_live_ranges_from_cascaded_passes( # 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 - lr_graph = _extract_live_ranges_from_schedule( + lr_graph = extract_live_ranges_from_schedule( op_subgraph, target_mem_area, target_mem_type_set, lr_graph ) else: @@ -316,7 +316,7 @@ def create_linear_live_range_graph(sg, target_mem_area, target_mem_type_set, lr_ return lr_graph -def _extract_live_ranges_from_schedule(sg, target_mem_area, target_mem_type_set, lr_graph): +def extract_live_ranges_from_schedule(sg, target_mem_area, target_mem_type_set, lr_graph): time_for_cascade = {} for sched_op in sg.sched_ops: op_info = sg.schedule.cost_map[sched_op] |