aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ohlsson <jonas.ohlsson@arm.com>2022-03-04 14:58:56 +0100
committerJonas Ohlsson <jonas.ohlsson@arm.com>2022-03-04 15:05:22 +0100
commit25e700c9894bc9ca5fb219e902c907c04b2048b2 (patch)
treefc90f128814f5c642e54a4c9c49af6c63c226ff2
parent51bb3379a24139e2af234548e56ff063728f8e7e (diff)
downloadethos-u-vela-25e700c9894bc9ca5fb219e902c907c04b2048b2.tar.gz
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 <jonas.ohlsson@arm.com> Change-Id: I457dec87b77487ca6f14ff4a679c4cc927b272b0
-rw-r--r--.pre-commit-config.yaml2
-rw-r--r--ethosu/vela/scheduler.py2
-rw-r--r--ethosu/vela/softmax.py4
-rw-r--r--ethosu/vela/tosa_reader.py2
4 files changed, 4 insertions, 6 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 17d3877..8e976b6 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 6b08459..3ef0d7f 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 13ca319..711c1e0 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 aadcb0a..2bec9cf 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