wonook commented on a change in pull request #57: [NEMO-73] SchedulingPolicy as 
Vertex-level Execution Property
URL: https://github.com/apache/incubator-nemo/pull/57#discussion_r198733676
 
 

 ##########
 File path: 
compiler/optimizer/src/main/java/edu/snu/nemo/compiler/optimizer/pass/compiletime/annotating/DefaultScheduleGroupPass.java
 ##########
 @@ -203,42 +203,42 @@ public DefaultScheduleGroupPass(final boolean 
allowBroadcastWithinScheduleGroup,
       }
     });
 
-    // Assign ScheduleGroupIndex property based on topology of ScheduleGroups
-    final MutableInt currentScheduleGroupIndex = new 
MutableInt(getNextScheudleGroupIndex(dag.getVertices()));
+    // Assign ScheduleGroup property based on topology of ScheduleGroups
+    final MutableInt currentScheduleGroup = new 
MutableInt(getNextScheudleGroupIndex(dag.getVertices()));
     final DAGBuilder<ScheduleGroup, ScheduleGroupEdge> scheduleGroupDAGBuilder 
= new DAGBuilder<>();
     scheduleGroups.forEach(scheduleGroupDAGBuilder::addVertex);
     scheduleGroups.forEach(src -> src.scheduleGroupsTo
         .forEach(dst -> scheduleGroupDAGBuilder.connectVertices(new 
ScheduleGroupEdge(src, dst))));
     scheduleGroupDAGBuilder.build().topologicalDo(scheduleGroup -> {
       boolean usedCurrentIndex = false;
       for (final IRVertex irVertex : scheduleGroup.vertices) {
-        if 
(!irVertex.getPropertyValue(ScheduleGroupIndexProperty.class).isPresent()) {
-          
irVertex.getExecutionProperties().put(ScheduleGroupIndexProperty.of(currentScheduleGroupIndex.getValue()));
+        if 
(!irVertex.getPropertyValue(ScheduleGroupProperty.class).isPresent()) {
+          
irVertex.getExecutionProperties().put(ScheduleGroupProperty.of(currentScheduleGroup.getValue()));
           usedCurrentIndex = true;
         }
       }
       if (usedCurrentIndex) {
-        currentScheduleGroupIndex.increment();
+        currentScheduleGroup.increment();
       }
     });
     return dag;
   }
 
   /**
-   * Determines the range of {@link ScheduleGroupIndexProperty} value that 
will prevent collision
-   * with the existing {@link ScheduleGroupIndexProperty}.
+   * Determines the range of {@link ScheduleGroupProperty} value that will 
prevent collision
+   * with the existing {@link ScheduleGroupProperty}.
    * @param irVertexCollection collection of {@link IRVertex}
-   * @return the minimum value for the {@link ScheduleGroupIndexProperty} that 
won't collide with the existing values
+   * @return the minimum value for the {@link ScheduleGroupProperty} that 
won't collide with the existing values
    */
   private int getNextScheudleGroupIndex(final Collection<IRVertex> 
irVertexCollection) {
 
 Review comment:
   index

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to