Repository: systemml
Updated Branches:
  refs/heads/master 8def2040b -> c13a1b04c


[SYSTEMML-2439] Fix robustness codegen optimizer for MLogreg

This patch fixes special cases of the cost-based codegen optimizer to be
robust against unavailable computation costs, e.g., when descending to
data nodes.


Project: http://git-wip-us.apache.org/repos/asf/systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/2d010285
Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/2d010285
Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/2d010285

Branch: refs/heads/master
Commit: 2d0102853805d533c0db4ec420c304555b2e4fb5
Parents: 8def204
Author: Matthias Boehm <[email protected]>
Authored: Fri Jul 13 12:37:37 2018 -0700
Committer: Matthias Boehm <[email protected]>
Committed: Fri Jul 13 12:37:37 2018 -0700

----------------------------------------------------------------------
 .../sysml/hops/codegen/opt/PlanSelectionFuseCostBasedV2.java      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/systemml/blob/2d010285/src/main/java/org/apache/sysml/hops/codegen/opt/PlanSelectionFuseCostBasedV2.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/hops/codegen/opt/PlanSelectionFuseCostBasedV2.java
 
b/src/main/java/org/apache/sysml/hops/codegen/opt/PlanSelectionFuseCostBasedV2.java
index 0e0091c..0ef255a 100644
--- 
a/src/main/java/org/apache/sysml/hops/codegen/opt/PlanSelectionFuseCostBasedV2.java
+++ 
b/src/main/java/org/apache/sysml/hops/codegen/opt/PlanSelectionFuseCostBasedV2.java
@@ -951,7 +951,8 @@ public class PlanSelectionFuseCostBasedV2 extends 
PlanSelection
                }
                
                //add compute costs of current operator to costs vector
-               costVect.computeCosts += computeCosts.get(currentHopId);
+               if( computeCosts.containsKey(currentHopId) )
+                       costVect.computeCosts += computeCosts.get(currentHopId);
                
                //process children recursively
                for( int i=0; i< current.getInput().size(); i++ ) {

Reply via email to