Skip to content

Commit 515032d

Browse files
committed
Arm backend: Don't fall back to TOSA-1.0+INT in case of exception
aot_arm_compiler.py silently fell back to TOSA-1.0+INT in case the user-provided TOSA spec could not be created. This may easily mislead the user by hiding actual errors with the input to the program. Change aot_arm_compiler.py to instead raising the exception in case the user-provided TOSA spec can not be created. Signed-off-by: Martin Lindström <Martin.Lindstroem@arm.com> Change-Id: I4a2d324e7b476af78b97efa12089d202b3da5cea
1 parent c7c7c0a commit 515032d

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

backends/arm/scripts/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ VERBS="Add|Fix|Update|Refactor|Improve|Remove|Change|Implement|Create|Modify|"\
3333
"Handle|Ignore|Interpret|Instantiate|Invoke|Limit|Load|Modify|Permit|Print|"\
3434
"Profile|Recalculate|Reconstruct|Redefine|Redesign|Reevaluate|Relocate|Remap|"\
3535
"Render|Reposition|Request|Revert|Sanitize|Specify|Strengthen|Stub|Substitute|"\
36-
"Tag|Tweak|Unify|Unlock|Unset|Use|Validate|Verify|Rename|Relax|Format"
36+
"Tag|Tweak|Unify|Unlock|Unset|Use|Validate|Verify|Rename|Relax|Format|Don't"
3737

3838
# Remote branch
3939
REMOTE=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null)

examples/arm/aot_arm_compiler.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,10 +438,7 @@ def get_compile_spec(
438438
) -> TosaCompileSpec | EthosUCompileSpec | VgfCompileSpec:
439439
compile_spec = None
440440
if target.startswith("TOSA"):
441-
try:
442-
tosa_spec = TosaSpecification.create_from_string(target)
443-
except Exception:
444-
tosa_spec = TosaSpecification.create_from_string("TOSA-1.0+INT")
441+
tosa_spec = TosaSpecification.create_from_string(target)
445442
compile_spec = TosaCompileSpec(tosa_spec)
446443
elif "ethos-u" in target:
447444
extra_flags = ["--verbose-operators", "--verbose-cycle-estimate"]

0 commit comments

Comments
 (0)