From 25e700c9894bc9ca5fb219e902c907c04b2048b2 Mon Sep 17 00:00:00 2001 From: Jonas Ohlsson Date: Fri, 4 Mar 2022 14:58:56 +0100 Subject: MLBEDSW-3367 Update pre-commit flake8 version Update the version of flake8 used in pre-commit to facilitate adding mypy to pre-commit. Signed-off-by: Jonas Ohlsson Change-Id: I457dec87b77487ca6f14ff4a679c4cc927b272b0 --- .pre-commit-config.yaml | 2 +- ethosu/vela/scheduler.py | 2 +- ethosu/vela/softmax.py | 4 +--- ethosu/vela/tosa_reader.py | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 17d38779..8e976b65 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: args: [--line-length=120] - repo: https://gitlab.com/pycqa/flake8 - rev: 3.7.9 + rev: 4.0.1 hooks: - id: flake8 args: [--max-line-length=120, --extend-ignore=E203] diff --git a/ethosu/vela/scheduler.py b/ethosu/vela/scheduler.py index 6b084593..3ef0d7f2 100644 --- a/ethosu/vela/scheduler.py +++ b/ethosu/vela/scheduler.py @@ -1099,7 +1099,7 @@ class Scheduler: ) print(f"\t\tSRAM Used: {mem_usage} bytes") - print(f"\tCascades:") + print("\tCascades:") for i, cascade in enumerate(schedule.cascades.values()): print(f"\t\t{i}: {cascade.start} -> {cascade.end}, size: {cascade.mem_usage}") diff --git a/ethosu/vela/softmax.py b/ethosu/vela/softmax.py index 13ca319b..711c1e04 100644 --- a/ethosu/vela/softmax.py +++ b/ethosu/vela/softmax.py @@ -501,9 +501,7 @@ class SoftMax: reciprocal_right_shift = add_op_get_ofm(create_sub(name, const_31, headroom_plus_one, no_scale_quant)) # PASS 7 - SHL - one = create_const_tensor( - f"one_const", [1, 1, 1, 1], DataType.int32, [1], np.int32, quantization=no_scale_quant - ) + one = create_const_tensor("one_const", [1, 1, 1, 1], DataType.int32, [1], np.int32, quantization=no_scale_quant) constant_one = add_op_get_ofm( create_shl(f"{self.op.name}_shl{pass_number}", one, reciprocal_right_shift, no_scale_quant) ) diff --git a/ethosu/vela/tosa_reader.py b/ethosu/vela/tosa_reader.py index aadcb0ad..2bec9cf1 100644 --- a/ethosu/vela/tosa_reader.py +++ b/ethosu/vela/tosa_reader.py @@ -253,7 +253,7 @@ class TosaSubgraph: if tens.quantization.zero_point is None: tens.quantization.zero_point = zp elif tens.quantization.zero_point != zp: - print(f"Error: Setting tensor zp not possible, tensor already has different zero point") + print("Error: Setting tensor zp not possible, tensor already has different zero point") assert False -- cgit v1.2.1