aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDwight Lidman <dwight.lidman@arm.com>2021-09-29 17:23:03 +0200
committerFredrik Svedberg <fredrik.svedberg@arm.com>2021-10-12 15:00:28 +0000
commitf54c18dff589f43abcfc57a119d2c1f87a5231ba (patch)
treeb6406c52ed3023124d9860499989b87ec76f64f3
parent1bf0f1976ae9d9ae8ef1e2c94af885a62276af43 (diff)
downloadethos-u-vela-f54c18dff589f43abcfc57a119d2c1f87a5231ba.tar.gz
MLBEDSW-5284 - MLCE: MEAN batch size constraint
Adds a constraint on batch size for the MEAN operator. Due to the restrictions imposed by the NHCWB16 format, some operators do not allow batch sizes larger than 1. The MEAN operator uses the operators in its implementation, but the constraint was missing and thus the operator was being wrongly placed on the NPU. Signed-off-by: Dwight Lidman <dwight.lidman@arm.com> Change-Id: I95e07a9151a6a131c337caa3114da1154be39e49
-rw-r--r--ethosu/vela/tflite_supported_operators.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/ethosu/vela/tflite_supported_operators.py b/ethosu/vela/tflite_supported_operators.py
index 933302f..d590054 100644
--- a/ethosu/vela/tflite_supported_operators.py
+++ b/ethosu/vela/tflite_supported_operators.py
@@ -204,6 +204,7 @@ class TFLiteSupportedOperators:
self.specific_constraints[Op.Pad].append(TFLiteSupportedOperators.constraint_pad_type)
# Mean specific checks:
+ self.specific_constraints[Op.Mean].append(TFLiteSupportedOperators.constraint_batch_size)
self.specific_constraints[Op.Mean].append(TFLiteSupportedOperators.constraint_mean_height_width_product_avgpool)
self.specific_constraints[Op.Mean].append(TFLiteSupportedOperators.constraint_mean_height_width_product)
self.specific_constraints[Op.Mean].append(TFLiteSupportedOperators.constraint_mean_height_width_product_int8)