diff options
author | Jonas Ohlsson <jonas.ohlsson@arm.com> | 2022-03-01 12:39:55 +0100 |
---|---|---|
committer | Jonas Ohlsson <jonas.ohlsson@arm.com> | 2022-03-21 11:09:39 +0100 |
commit | 845e23200d471e44f274940846e400d170b5ff37 (patch) | |
tree | 28a01492bf11f0ff69309ead9bd8a1bad9e14cbb /ethosu/vela/hillclimb_allocation.py | |
parent | d2b5510697e7789f5a416f9d80d3cb640eecc092 (diff) | |
download | ethos-u-vela-845e23200d471e44f274940846e400d170b5ff37.tar.gz |
MLBEDSW-3367 Add mypy to pre-commit
Add mypy to pre-commit and clean up all reported errors.
Signed-off-by: Jonas Ohlsson <jonas.ohlsson@arm.com>
Change-Id: If7dc869f5fecdb0e2db40f14e7d9db21aa33df71
Diffstat (limited to 'ethosu/vela/hillclimb_allocation.py')
-rw-r--r-- | ethosu/vela/hillclimb_allocation.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ethosu/vela/hillclimb_allocation.py b/ethosu/vela/hillclimb_allocation.py index 5e02dac0..2271fe9c 100644 --- a/ethosu/vela/hillclimb_allocation.py +++ b/ethosu/vela/hillclimb_allocation.py @@ -101,7 +101,7 @@ class HillClimbAllocator: LiveRangeInfo(id, lr.start_time, lr.end_time, lr.size, lr.get_alignment()) for id, lr in enumerate(live_ranges) ] - self.lrs_at_time = [] + self.lrs_at_time: List[List[LiveRangeInfo]] = [] # The available size (input to algorithm). self.available_size: int = 0 # The algorithm stops once the target size has been achieved @@ -227,8 +227,8 @@ class HillClimbAllocator: # - direct neighbours of the bottleneck live range # - direct and indirect predecessors of these neighbours + bottleneck # The turns at which these live ranges were allocated are put in the turns set. - turn_set = set() - turn_list = list() + turn_set: Set[int] = set() + turn_list: List[int] = list() self.add_predecessor_turns(turn_set, turn_list, max_lr) for lr2 in max_lr.neighbours: self.add_predecessor_turns(turn_set, turn_list, lr2) |