@@ -94,9 +94,6 @@ class HillClimbingScheduler : public ImprovementScheduler<Graph_t> {
9494 // Create superstep lists (for convenience) for a BSP schedule
9595 void CreateSupstepLists ();
9696
97- // Combine subsequent supersteps whenever there is no communication inbetween
98- void RemoveNeedlessSupSteps ();
99-
10097 // For memory constraints
10198 bool use_memory_constraint = false ;
10299 std::vector<std::vector<v_memw_t <Graph_t>>> memory_used;
@@ -178,9 +175,9 @@ RETURN_STATUS HillClimbingScheduler<Graph_t>::improveScheduleWithStepLimit(BspSc
178175
179176template <typename Graph_t>
180177void HillClimbingScheduler<Graph_t>::Init() {
181- if (shrink) // NOTE: shrinking a MaxBspSchedule (without CS) might increase cost
178+ if (shrink)
182179 {
183- RemoveNeedlessSupSteps ();
180+ schedule-> shrinkByMergingSupersteps ();
184181 CreateSupstepLists ();
185182 }
186183
@@ -971,37 +968,6 @@ bool HillClimbingScheduler<Graph_t>::violatesMemConstraint(vertex_idx node, unsi
971968 return false ;
972969}
973970
974- template <typename Graph_t>
975- void HillClimbingScheduler<Graph_t>::RemoveNeedlessSupSteps() {
976-
977- unsigned current_step = 0 ;
978-
979- unsigned nextBreak = schedule->numberOfSupersteps (), breakAfterNext = schedule->numberOfSupersteps ();
980- for (unsigned step = 0 ; step < schedule->numberOfSupersteps (); ++step) {
981- if (nextBreak == step) {
982- ++current_step;
983- nextBreak = breakAfterNext;
984- if (schedule->getStaleness () == 2 )
985- breakAfterNext = schedule->numberOfSupersteps ();
986- }
987- for (unsigned proc = 0 ; proc < schedule->getInstance ().getArchitecture ().numberOfProcessors (); ++proc)
988- for (const vertex_idx node : supsteplists[step][proc]) {
989- schedule->setAssignedSuperstep (node, current_step);
990- for (const vertex_idx &succ : schedule->getInstance ().getComputationalDag ().children (node))
991- {
992- if (schedule->assignedProcessor (node) != schedule->assignedProcessor (succ))
993- {
994- nextBreak = std::min (nextBreak, schedule->assignedSuperstep (succ) + 1 - schedule->getStaleness ());
995- if (schedule->getStaleness () == 2 )
996- breakAfterNext = std::min (breakAfterNext, schedule->assignedSuperstep (succ));
997- }
998- }
999- }
1000- }
1001-
1002- schedule->updateNumberOfSupersteps ();
1003- }
1004-
1005971template <typename Graph_t>
1006972void HillClimbingScheduler<Graph_t>::CreateSupstepLists() {
1007973
0 commit comments