diff options
author | Andreas Nevalainen <andreas.nevalainen@arm.com> | 2020-10-28 15:42:08 +0100 |
---|---|---|
committer | patrik.gustavsson <patrik.gustavsson@arm.com> | 2020-11-11 08:34:16 +0000 |
commit | 897cc14968e017b1f48f376f7f7cefc515c5fe88 (patch) | |
tree | 27d17a59f1529c1ed0b1cc59e60438ee7f5d29d2 /ethosu/vela/register_command_stream_generator.py | |
parent | 73320a48dfa711f5938b0e3d8e03b9858558b899 (diff) | |
download | ethos-u-vela-897cc14968e017b1f48f376f7f7cefc515c5fe88.tar.gz |
MLBEDSW-3222: Bias tensors in fast storage
For IFM streamed cascades bias tensors are read several times.
Moves these tensors to fast storage and add DMA commands.
Change-Id: I630f6275986c1b5e3f126c925b11e22500fb1128
Signed-off-by: Andreas Nevalainen <andreas.nevalainen@arm.com>
Diffstat (limited to 'ethosu/vela/register_command_stream_generator.py')
-rw-r--r-- | ethosu/vela/register_command_stream_generator.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ethosu/vela/register_command_stream_generator.py b/ethosu/vela/register_command_stream_generator.py index 0abd8828..e5e4fb14 100644 --- a/ethosu/vela/register_command_stream_generator.py +++ b/ethosu/vela/register_command_stream_generator.py @@ -388,8 +388,11 @@ def generate_register_command_stream(nng, sg, arch, verbose=False): dst_addr = cmd.out_tensor.address_for_coordinate(start_coord) if cmd.in_tensor.compressed_values is not None: - stream_index = cmd.in_tensor.compressed_stream_index_from_coord(start_coord) - sz = cmd.in_tensor.size_of_compressed_stream(stream_index) + if cmd.out_tensor.purpose == TensorPurpose.FSBias: + sz = cmd.in_tensor.storage_size() + else: + stream_index = cmd.in_tensor.compressed_stream_index_from_coord(start_coord) + sz = cmd.in_tensor.size_of_compressed_stream(stream_index) else: sz = cmd.in_tensor.address_for_coordinate(cmd.box.end_coord, is_top_box=True) - src_addr |