Skip to content
Snippets Groups Projects

Add IO times for list schedulers

Merged Simon Bjurek requested to merge specify-io-order-schedulers into master
Files
7
+ 9
4
@@ -124,7 +124,8 @@ class EarliestDeadlineScheduler(ListScheduler):
deadlines = {}
for op_id, start_time in schedule_copy.start_times.items():
deadlines[op_id] = start_time + schedule.sfg.find_by_id(op_id).latency
if not op_id.startswith("in"):
deadlines[op_id] = start_time + schedule.sfg.find_by_id(op_id).latency
return sorted(deadlines, key=deadlines.get)
@@ -137,7 +138,10 @@ class LeastSlackTimeScheduler(ListScheduler):
schedule_copy = copy.copy(schedule)
ALAPScheduler().apply_scheduling(schedule_copy)
return sorted(schedule_copy.start_times, key=schedule_copy.start_times.get)
sorted_ops = sorted(
schedule_copy.start_times, key=schedule_copy.start_times.get
)
return [op for op in sorted_ops if not op.startswith("in")]
class MaxFanOutScheduler(ListScheduler):
@@ -152,7 +156,8 @@ class MaxFanOutScheduler(ListScheduler):
for op_id, start_time in schedule_copy.start_times.items():
fan_outs[op_id] = len(schedule.sfg.find_by_id(op_id).output_signals)
return sorted(fan_outs, key=fan_outs.get, reverse=True)
sorted_ops = sorted(fan_outs, key=fan_outs.get, reverse=True)
return [op for op in sorted_ops if not op.startswith("in")]
class HybridScheduler(ListScheduler):
@@ -199,4 +204,4 @@ class HybridScheduler(ListScheduler):
sorted_op_list = [pair[0] for pair in fan_out_sorted_items]
return sorted_op_list
return [op for op in sorted_op_list if not op.startswith("in")]
Loading