aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/register_command_stream_generator.py
diff options
context:
space:
mode:
authorPatrik Gustavsson <patrik.gustavsson@arm.com>2020-09-16 14:55:40 +0200
committerpatrik.gustavsson <patrik.gustavsson@arm.com>2020-09-21 12:10:48 +0000
commitcb33704fcd7859b1c334f996445bba2f4efea5f9 (patch)
tree9a0585edb1ced16f05b431cd4391860c616d22c1 /ethosu/vela/register_command_stream_generator.py
parent504d6b6b81a564c45e970667e0ace71714bf02dc (diff)
downloadethos-u-vela-cb33704fcd7859b1c334f996445bba2f4efea5f9.tar.gz
MLBEDSW-1693 Convert batched FC to Conv
Added support to convert batched FC to conv. This enables choosing a suitable block-size. Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com> Change-Id: Idc49e4fb6d29c554f10a38ece7996a7b7795ffad
Diffstat (limited to 'ethosu/vela/register_command_stream_generator.py')
-rw-r--r--ethosu/vela/register_command_stream_generator.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/ethosu/vela/register_command_stream_generator.py b/ethosu/vela/register_command_stream_generator.py
index 8f34e639..acfd25a2 100644
--- a/ethosu/vela/register_command_stream_generator.py
+++ b/ethosu/vela/register_command_stream_generator.py
@@ -968,13 +968,11 @@ def generate_register_command_stream(nng, sg, arch, verbose=False):
emit.cmd0_with_param(cmd0.NPU_SET_IFM2_WIDTH0_M1, width_0 - 1)
else:
if len(out_shape) == 2:
- # TODO: N is put in W-dimension for now
- # Should be spread over H and W, but then block size selectetion,
- # and stride calculation should be changed
+ assert out_shape[0] == 1
if tens == cmd.ifm_tensor:
- emit.cmd0_with_param(cmd0.NPU_SET_IFM_WIDTH0_M1, out_shape[-2] - 1)
+ emit.cmd0_with_param(cmd0.NPU_SET_IFM_WIDTH0_M1, 0)
elif tens == cmd.ofm_tensor:
- emit.cmd0_with_param(cmd0.NPU_SET_OFM_WIDTH0_M1, out_shape[-2] - 1)
+ emit.cmd0_with_param(cmd0.NPU_SET_OFM_WIDTH0_M1, 0)
else:
assert False