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/npu_serialisation.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/npu_serialisation.py')
-rw-r--r-- | ethosu/vela/npu_serialisation.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ethosu/vela/npu_serialisation.py b/ethosu/vela/npu_serialisation.py index 0bd03001..04534cce 100644 --- a/ethosu/vela/npu_serialisation.py +++ b/ethosu/vela/npu_serialisation.py @@ -128,7 +128,10 @@ def serialise_npu_subgraph_into_tensors(nng, sg, arch, scratch_tens, scratch_fas else: copy_compressed_values_to_memory_tensor(sg.flash_tensor, ps.weight_tensor) - copy_compressed_values_to_memory_tensor(sg.flash_tensor, ps.scale_tensor) + if ps.scale_tensor.ops[0].type == Op.DMA: + copy_compressed_values_to_memory_tensor(sg.flash_tensor, ps.scale_tensor.ops[0].inputs[0]) + else: + copy_compressed_values_to_memory_tensor(sg.flash_tensor, ps.scale_tensor) if ps.lut_tensor is not None: copy_ifm_values_to_memory_tensor(sg.flash_tensor, ps.lut_tensor) |