aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mlia/target/cortex_a/advisor.py10
-rw-r--r--src/mlia/target/ethos_u/advisor.py4
-rw-r--r--src/mlia/target/tosa/advisor.py8
3 files changed, 20 insertions, 2 deletions
diff --git a/src/mlia/target/cortex_a/advisor.py b/src/mlia/target/cortex_a/advisor.py
index 5c077fb..3c127ec 100644
--- a/src/mlia/target/cortex_a/advisor.py
+++ b/src/mlia/target/cortex_a/advisor.py
@@ -44,6 +44,16 @@ class CortexAInferenceAdvisor(DefaultInferenceAdvisor):
if context.category_enabled(AdviceCategory.COMPATIBILITY):
collectors.append(CortexAOperatorCompatibility(model, target_config))
+ if context.category_enabled(AdviceCategory.PERFORMANCE):
+ raise Exception(
+ "Performance estimation is currently not supported for Cortex-A."
+ )
+
+ if context.category_enabled(AdviceCategory.OPTIMIZATION):
+ raise Exception(
+ "Model optimizations are currently not supported for Cortex-A."
+ )
+
return collectors
def get_analyzers(self, context: Context) -> list[DataAnalyzer]:
diff --git a/src/mlia/target/ethos_u/advisor.py b/src/mlia/target/ethos_u/advisor.py
index 0eec6aa..714d6a4 100644
--- a/src/mlia/target/ethos_u/advisor.py
+++ b/src/mlia/target/ethos_u/advisor.py
@@ -53,9 +53,9 @@ class EthosUInferenceAdvisor(DefaultInferenceAdvisor):
# Decide which one to use (taking into account the model format).
if is_tflite_model(model):
# TensorFlow Lite models do not support optimization (only performance)!
- if context.advice_category == AdviceCategory.OPTIMIZATION:
+ if context.category_enabled(AdviceCategory.OPTIMIZATION):
raise Exception(
- "Command 'optimization' is not supported for TensorFlow Lite files."
+ "Optimizations are not supported for TensorFlow Lite files."
)
if context.category_enabled(AdviceCategory.PERFORMANCE):
collectors.append(EthosUPerformance(model, target_config, backends))
diff --git a/src/mlia/target/tosa/advisor.py b/src/mlia/target/tosa/advisor.py
index 7666df4..7859eca 100644
--- a/src/mlia/target/tosa/advisor.py
+++ b/src/mlia/target/tosa/advisor.py
@@ -43,6 +43,14 @@ class TOSAInferenceAdvisor(DefaultInferenceAdvisor):
if context.category_enabled(AdviceCategory.COMPATIBILITY):
collectors.append(TOSAOperatorCompatibility(model))
+ if context.category_enabled(AdviceCategory.PERFORMANCE):
+ raise Exception(
+ "Performance estimation is currently not supported for TOSA."
+ )
+
+ if context.category_enabled(AdviceCategory.OPTIMIZATION):
+ raise Exception("Model optimizations are currently not supported for TOSA.")
+
return collectors
def get_analyzers(self, context: Context) -> list[DataAnalyzer]: