wonook commented on a change in pull request #88: [NEMO-138] Rule-based policy
URL: https://github.com/apache/incubator-nemo/pull/88#discussion_r208289956
##########
File path:
compiler/optimizer/src/main/java/edu/snu/nemo/compiler/optimizer/policy/PolicyImpl.java
##########
@@ -66,7 +68,8 @@ private CompiletimeOptimizer() {
if (passes.hasNext()) {
final CompileTimePass passToApply = passes.next();
// Apply the pass to the DAG.
- final DAG<IRVertex, IREdge> processedDAG = passToApply.apply(dag);
+ final DAG<IRVertex, IREdge> processedDAG =
passToApply.getCondition().test(dag)
+ ? passToApply.apply(dag) : dag;
Review comment:
Good idea! I'll apply that on the code.
----------------------------------------------------------------
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