diff options
author | Dwight Lidman <dwight.lidman@arm.com> | 2020-08-24 16:05:47 +0200 |
---|---|---|
committer | patrik.gustavsson <patrik.gustavsson@arm.com> | 2020-08-25 11:41:55 +0000 |
commit | 7579c75d870c25ee075e46a110b6b89cf266db64 (patch) | |
tree | a83ff77ea4ae011d722d49a856bdb25b6e568571 /ethosu | |
parent | 87c13507b4f44edff0c819aa2bb6f9966c85c841 (diff) | |
download | ethos-u-vela-7579c75d870c25ee075e46a110b6b89cf266db64.tar.gz |
MLBEDSW-2867: Split operators get placed on CPU
This commit fixes a bug wherein Split operators
are being erroneously placed on the CPU due to
a 0-dimensional input that disqualifies it from
NPU placement; a restriction introduced in a
recent commit.
Signed-off-by: Dwight Lidman <dwight.lidman@arm.com>
Change-Id: I83c047ddf071d662343087c69bdb2a014dd209c3
Diffstat (limited to 'ethosu')
-rw-r--r-- | ethosu/vela/supported_operators.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ethosu/vela/supported_operators.py b/ethosu/vela/supported_operators.py index ab7f2db7..ec81e76b 100644 --- a/ethosu/vela/supported_operators.py +++ b/ethosu/vela/supported_operators.py @@ -90,6 +90,7 @@ class SupportedOperators: self.memory_only_ops = ( set(("Squeeze", "Reshape", "QuantizedReshape", "ExpandDims",)) | self.concat_ops | self.split_ops ) + self.shapeless_input_ops = self.binary_elem_wise_main_ops | set(("Split", "SplitV",)) self.supported_fused_activations = set(("Relu", "Relu6", "ReluN1To1", "Tanh", "Sigmoid", "LUT",)) self.supported_operators = ( self.npu_pre_ops | self.mac_main_ops | self.elem_wise_main_ops | self.npu_post_ops | self.memory_only_ops @@ -138,7 +139,7 @@ class SupportedOperators: if not t.has_fully_defined_shape(): print("Warning:", op.type, "has input(s) of undefined shape, placing on CPU") return False - if t.shape == [] and op.type not in self.binary_elem_wise_main_ops: + if t.shape == [] and op.type not in self.shapeless_input_ops: print( "Warning:", op.type, |