From 068a1671b6ca66f7710337a6236ddb5ca0ddcb58 Mon Sep 17 00:00:00 2001 From: Gabor Abonyi Date: Thu, 18 Jan 2024 19:48:22 +0100 Subject: [PATCH] ml-eval-kit: Remove default NPU config list patch Use the -additional-ethos-u-config-name option to generate required NPU optimization instead of patching default list. Signed-off-by: Gabor Abonyi --- .../integration/cmake/BuildMlEmbeddedEvaluationKit.cmake | 5 ++++- ...rces-Replace-model-wav2letter-with-tiny_wav2let.patch | 9 --------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/components/ai/ml_embedded_evaluation_kit/integration/cmake/BuildMlEmbeddedEvaluationKit.cmake b/components/ai/ml_embedded_evaluation_kit/integration/cmake/BuildMlEmbeddedEvaluationKit.cmake index 8625bd24..b0e8fd2f 100644 --- a/components/ai/ml_embedded_evaluation_kit/integration/cmake/BuildMlEmbeddedEvaluationKit.cmake +++ b/components/ai/ml_embedded_evaluation_kit/integration/cmake/BuildMlEmbeddedEvaluationKit.cmake @@ -37,10 +37,13 @@ ExternalProject_Add( ${CMAKE_COMMAND} --build --target ${ML_TARGETS} ) +set(ML_RESOURCES_SET_UP_ARGS + "--additional-ethos-u-config-name=${ETHOSU_TARGET_NPU_CONFIG}" +) ExternalProject_Add_Step(ml_embedded_evaluation_kit-build download_model COMMAND - python3 ${ml_embedded_evaluation_kit_SOURCE_DIR}/set_up_default_resources.py + python3 ${ml_embedded_evaluation_kit_SOURCE_DIR}/set_up_default_resources.py ${ML_RESOURCES_SET_UP_ARGS} DEPENDERS configure USES_TERMINAL ON diff --git a/components/ai/ml_embedded_evaluation_kit/integration/patches/0001-resources-Replace-model-wav2letter-with-tiny_wav2let.patch b/components/ai/ml_embedded_evaluation_kit/integration/patches/0001-resources-Replace-model-wav2letter-with-tiny_wav2let.patch index ba58dd0a..87c3e3ce 100644 --- a/components/ai/ml_embedded_evaluation_kit/integration/patches/0001-resources-Replace-model-wav2letter-with-tiny_wav2let.patch +++ b/components/ai/ml_embedded_evaluation_kit/integration/patches/0001-resources-Replace-model-wav2letter-with-tiny_wav2let.patch @@ -63,15 +63,6 @@ index b442432..a0d6149 100755 }, { "sub_folder": "asr", -@@ -235,7 +235,7 @@ valid_npu_config_names = [ - ] - - # Default NPU configurations (these are always run when the models are optimised) --default_npu_config_names = [valid_npu_config_names[2], valid_npu_config_names[4]] -+default_npu_config_names = [valid_npu_config_names[2], valid_npu_config_names[3], valid_npu_config_names[4]] - - # NPU config named tuple - NPUConfig = namedtuple( diff --git a/source/use_case/asr/usecase.cmake b/source/use_case/asr/usecase.cmake index fc3f2b5..3ce2c0a 100644 --- a/source/use_case/asr/usecase.cmake