Skip to content
Merged
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
10 changes: 6 additions & 4 deletions backends/arm/tosa_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,14 @@ def preprocess( # noqa: C901
input_order = list(map(int, spec.value.decode().split(",")))

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

tosa_spec = get_tosa_spec(compile_spec)
assert (
tosa_spec is not None
), "TOSA backend needs a TOSA version specified in the CompileSpec!"
if tosa_spec is None:
raise ValueError(
"TOSA backend needs a TOSA version specified in the CompileSpec"
)

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

Expand Down
Loading