Wan Xinyi
commited on
Commit
·
c47cbb6
1
Parent(s):
e7d1e67
Fix small m for zbv
Browse files- app.py +1 -1
- v_schedule.py +2 -2
app.py
CHANGED
@@ -71,7 +71,7 @@ def calculate(p, m, f, b, w, c, mem):
|
|
71 |
zb_bubble=percentage(zb_time/(f+b+w)/m - 1)
|
72 |
zb_acceleration=percentage(baseline_time/zb_time - 1) if baseline_time is not None else None
|
73 |
|
74 |
-
if mem < p
|
75 |
zbv_time=None
|
76 |
zbv_bubble=None
|
77 |
zbv_acceleration=None
|
|
|
71 |
zb_bubble=percentage(zb_time/(f+b+w)/m - 1)
|
72 |
zb_acceleration=percentage(baseline_time/zb_time - 1) if baseline_time is not None else None
|
73 |
|
74 |
+
if mem < p:
|
75 |
zbv_time=None
|
76 |
zbv_bubble=None
|
77 |
zbv_acceleration=None
|
v_schedule.py
CHANGED
@@ -145,7 +145,7 @@ class PipelineGraph(object):
|
|
145 |
end_tmp = cur_time[0] + self.fbw_cost[1]
|
146 |
continue
|
147 |
tmp = end_tmp + self.c_cost
|
148 |
-
while count[i][0] + count[i][1] < count[i - 1][0] + count[i - 1][1]:
|
149 |
for j in range(self.n_stage - 1, i - 1, -1):
|
150 |
if count[j][iter_chunk_] < self.n_micro:
|
151 |
put(0, iter_chunk_, j)
|
@@ -471,4 +471,4 @@ if __name__ == '__main__':
|
|
471 |
max_mem=mem_f * (p * 2 + m_offset),
|
472 |
)
|
473 |
graph.get_v_schedule()
|
474 |
-
break
|
|
|
145 |
end_tmp = cur_time[0] + self.fbw_cost[1]
|
146 |
continue
|
147 |
tmp = end_tmp + self.c_cost
|
148 |
+
while count[i][0] + count[i][1] < count[i - 1][0] + count[i - 1][1] or count[i][1] <= count[i - 1][1] < self.n_micro:
|
149 |
for j in range(self.n_stage - 1, i - 1, -1):
|
150 |
if count[j][iter_chunk_] < self.n_micro:
|
151 |
put(0, iter_chunk_, j)
|
|
|
471 |
max_mem=mem_f * (p * 2 + m_offset),
|
472 |
)
|
473 |
graph.get_v_schedule()
|
474 |
+
break
|