aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/supported_operators.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/supported_operators.py')
-rw-r--r--ethosu/vela/supported_operators.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ethosu/vela/supported_operators.py b/ethosu/vela/supported_operators.py
index b5853236..43ba36f0 100644
--- a/ethosu/vela/supported_operators.py
+++ b/ethosu/vela/supported_operators.py
@@ -330,6 +330,9 @@ class SupportedOperators:
# check stride size
if len(op.inputs) > 3 and any(stride != 1 for stride in op.inputs[3].values):
return False
+ # check "end - begin" doesnt result in any zero or negative elements
+ if any((end - begin) <= 0 for begin, end in zip(op.inputs[1].values, op.inputs[2].values)):
+ return False
# check ellipsis_mask
if op.attrs["ellipsis_mask"] != 0:
return False