aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Bohlin <jacob.bohlin@arm.com>2020-08-13 09:37:02 +0200
committerFredrik Knutsson <fredrik.knutsson.hunnebo@gmail.com>2020-08-13 13:33:53 +0000
commitbf61268fae3d05ae7687067ae2ab2964067634c9 (patch)
treea175d80b74eff005dddd5554b3f91c3a0a6c50fd
parent8b24f2b2a8823720f399018923d2d4cf717fe63b (diff)
downloadethos-u-vela-bf61268fae3d05ae7687067ae2ab2964067634c9.tar.gz
MLBEDSW-2755: Added check that ifm2_tensor is set
Signed-off-by: Jacob Bohlin <jacob.bohlin@arm.com> Change-Id: I5b8db6430e79ec7a5836d8dd00a03413647de8ba
-rw-r--r--ethosu/vela/register_command_stream_generator.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ethosu/vela/register_command_stream_generator.py b/ethosu/vela/register_command_stream_generator.py
index 471953d9..28b67656 100644
--- a/ethosu/vela/register_command_stream_generator.py
+++ b/ethosu/vela/register_command_stream_generator.py
@@ -487,7 +487,7 @@ def generate_register_command_stream(nng, sg, arch, verbose=False):
IFM2Broadcast.ReverseOperandOrder if primary_op.attrs.get("reverse_op_order", False) else 0
)
- if not ifm_ifm2_correct_order(cmd.ifm_tensor.shape, cmd.ifm2_tensor.shape):
+ if cmd.ifm2_tensor and not ifm_ifm2_correct_order(cmd.ifm_tensor.shape, cmd.ifm2_tensor.shape):
# The scalar has to be the ifm2 tensor so switch the ifms
cmd.ifm_tensor, cmd.ifm2_tensor = cmd.ifm2_tensor, cmd.ifm_tensor
cmd.ifm_box, cmd.ifm2_box = cmd.ifm2_box, cmd.ifm_box