aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/high_level_command_stream_generator.py
diff options
context:
space:
mode:
authorTim Hall <tim.hall@arm.com>2022-05-04 16:20:43 +0100
committerTim Hall <tim.hall@arm.com>2022-05-04 16:26:09 +0100
commitb5df773e92051004158046b0ed2c7b802198de6e (patch)
tree7d738a28a63b66a20f379acbdfc6c3e7c4a98a61 /ethosu/vela/high_level_command_stream_generator.py
parent95b07c1c0fed6a985607131e59a593786d40b389 (diff)
downloadethos-u-vela-b5df773e92051004158046b0ed2c7b802198de6e.tar.gz
Revert "MLBEDSW-6263: Use separate tensors for double buffering"
This reverts commit cc5f4de1c35ba44fca7ff6295c6ae846f8242344. Signed-off-by: Tim Hall <tim.hall@arm.com> Change-Id: I0fa5babfe9ad9ec668720d04fe1c16d9a9092131
Diffstat (limited to 'ethosu/vela/high_level_command_stream_generator.py')
-rw-r--r--ethosu/vela/high_level_command_stream_generator.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/ethosu/vela/high_level_command_stream_generator.py b/ethosu/vela/high_level_command_stream_generator.py
index 81c0d5b4..136f5a9b 100644
--- a/ethosu/vela/high_level_command_stream_generator.py
+++ b/ethosu/vela/high_level_command_stream_generator.py
@@ -204,12 +204,9 @@ def generate_high_level_commands_for_sched_op(sched_op, schedule):
if op_info.npu_weights_tensor:
weight_box = Box([0, 0, 0, start_channel], [1, 1, 1, end_channel])
- if op_info.buffered_weight_tensors and is_first_h_stripe:
- idx = depth_idx % len(op_info.buffered_weight_tensors)
- yield from dma_if_necessary(
- sched_op.parent_ps, weight_box, op_info.buffered_weight_tensors[idx]
- )
- weight_tensor = op_info.buffered_weight_tensors[idx]
+ if op_info.buffered_weight_tensor and is_first_h_stripe:
+ yield from dma_if_necessary(sched_op.parent_ps, weight_box, op_info.buffered_weight_tensor)
+ weight_tensor = op_info.buffered_weight_tensor
else:
weight_box = None