Skip to content

Commit 69df492

Browse files
Merge branch 'main' into add-gt-lt-scalar-ops
2 parents 22495d8 + c70c208 commit 69df492

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

backends/arm/test/test_model.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ def build_ethosu_runtime(
176176
pte_file: str,
177177
target: str,
178178
system_config: str,
179+
memory_mode: str,
179180
extra_flags: str,
180181
elf_build_path: str,
181182
):
@@ -195,6 +196,7 @@ def build_ethosu_runtime(
195196
f"--target={target}",
196197
"--build_type=Release",
197198
f"--system_config={system_config}",
199+
f"--memory_mode={memory_mode}",
198200
extra_build_flag,
199201
f"--output={elf_build_path}",
200202
]
@@ -256,6 +258,7 @@ def run_elf_with_fvp(script_path: str, elf_file: str, target: str):
256258
pte_file,
257259
args.target,
258260
args.system_config,
261+
args.memory_mode,
259262
args.extra_flags,
260263
elf_build_path,
261264
)

backends/arm/tosa_backend.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,14 @@ def preprocess( # noqa: C901
7575
input_order = list(map(int, spec.value.decode().split(",")))
7676

7777
# Check that the output format is set correctly in the compile spec
78-
assert output_format == "tosa", "output format must be tosa"
78+
if output_format != "tosa":
79+
raise ValueError(f'Invalid output format {output_format}, must be "tosa"')
7980

8081
tosa_spec = get_tosa_spec(compile_spec)
81-
assert (
82-
tosa_spec is not None
83-
), "TOSA backend needs a TOSA version specified in the CompileSpec!"
82+
if tosa_spec is None:
83+
raise ValueError(
84+
"TOSA backend needs a TOSA version specified in the CompileSpec"
85+
)
8486

8587
logger.info(f"Converting ExportedProgram to TOSA: {tosa_spec}")
8688

0 commit comments

Comments
 (0)