diff --git a/backends/arm/test/test_model.py b/backends/arm/test/test_model.py index 072583ef862..3e3ecf30fa0 100755 --- a/backends/arm/test/test_model.py +++ b/backends/arm/test/test_model.py @@ -64,7 +64,7 @@ def get_args(): parser.add_argument( "--timeout", required=False, - default=60 * 10, + default=60 * 20, help="Timeout in seconds used when running the model", ) args = parser.parse_args() @@ -165,11 +165,6 @@ def build_ethosu_runtime( extra_flags: str, elf_build_path: str, ): - - extra_build_flag = "" - if extra_flags: - extra_build_flag = f"--extra_build_flags={extra_flags}" - run_external_cmd( [ "bash", @@ -182,7 +177,7 @@ def build_ethosu_runtime( "--build_type=Release", f"--system_config={system_config}", f"--memory_mode={memory_mode}", - extra_build_flag, + f"--extra_build_flags=-DET_DUMP_OUTPUT=OFF {extra_flags}", f"--output={elf_build_path}", ] ) diff --git a/examples/arm/executor_runner/CMakeLists.txt b/examples/arm/executor_runner/CMakeLists.txt index f7bc3a5eb78..7666af45769 100644 --- a/examples/arm/executor_runner/CMakeLists.txt +++ b/examples/arm/executor_runner/CMakeLists.txt @@ -11,6 +11,8 @@ option(ET_ARM_BAREMETAL_METHOD_ALLOCATOR_POOL_SIZE "Set ET_ARM_BAREMETAL_METHOD_ option(ET_BUNDLE_IO "Set to compile in BundleIO support" OFF) option(ET_ATOL "Set atol to use for BundleIO testing" OFF) option(ET_RTOL "Set rtol to use for BundleIO testing" OFF) +option(ET_DUMP_INPUT "Dump input in log" OFF) +option(ET_DUMP_OUTPUT "Dump output in log" ON) option(FETCH_ETHOS_U_CONTENT "Fetch ethos_u dependencies instead of relying on pre-downloads" ON) if(NOT DEFINED ET_PTE_FILE_PATH AND NOT ${SEMIHOSTING}) @@ -664,6 +666,14 @@ if(ET_RTOL) target_compile_definitions(arm_executor_runner PUBLIC ET_RTOL=${ET_RTOL}) endif() +if(ET_DUMP_INPUT) + target_compile_definitions(arm_executor_runner PUBLIC -DET_DUMP_INPUT) +endif() + +if(ET_DUMP_OUTPUT) + target_compile_definitions(arm_executor_runner PUBLIC -DET_DUMP_OUTPUT) +endif() + # Fixup compilation of retarget.c if(SEMIHOSTING) # Remove this when MLBEDSW-8910 is closed. diff --git a/examples/arm/executor_runner/arm_executor_runner.cpp b/examples/arm/executor_runner/arm_executor_runner.cpp index 5944a1f081c..775d8841abe 100644 --- a/examples/arm/executor_runner/arm_executor_runner.cpp +++ b/examples/arm/executor_runner/arm_executor_runner.cpp @@ -641,7 +641,7 @@ int main(int argc, const char* argv[]) { prepared_inputs.error()); } } -#ifdef DUMP_INPUT +#if defined(ET_DUMP_INPUT) { std::vector inputs(method->inputs_size()); ET_LOG(Info, "%zu inputs: ", inputs.size()); @@ -756,7 +756,7 @@ int main(int argc, const char* argv[]) { for (int i = 0; i < outputs.size(); ++i) { Tensor t = outputs[i].toTensor(); #if !defined(SEMIHOSTING) -#if !defined(ET_BUNDLE_IO) +#if defined(ET_DUMP_OUTPUT) // The output might be collected and parsed so printf() is used instead // of ET_LOG() here for (int j = 0; j < outputs[i].toTensor().numel(); ++j) {