Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions backends/arm/test/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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",
Expand All @@ -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}",
]
)
Expand Down
10 changes: 10 additions & 0 deletions examples/arm/executor_runner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions examples/arm/executor_runner/arm_executor_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ int main(int argc, const char* argv[]) {
prepared_inputs.error());
}
}
#ifdef DUMP_INPUT
#if defined(ET_DUMP_INPUT)
{
std::vector<EValue> inputs(method->inputs_size());
ET_LOG(Info, "%zu inputs: ", inputs.size());
Expand Down Expand Up @@ -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) {
Expand Down
Loading