[SYSTEMML-2150] Fix codegen optimizer cost model (incorrect input size)

This patch fixes the codegen cost-based optimizer cost model,
specifically to compute the input sizes from the output memory estimates
of inputs not their total memory estimate. SYSTEMML-1979 introduced this
issue when incorporating the handling of sparsity. 

For L2SVM over Mnist80m (180GB) w/ 20 outer iterations, this patch
improved the end-to-end runtime form 750s to 593s.


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

Branch: refs/heads/master
Commit: de8f2c77c644efb4253739f62ca3f0d311ccc8ec
Parents: 62e590c
Author: Matthias Boehm <[email protected]>
Authored: Thu Feb 15 22:24:01 2018 -0800
Committer: Matthias Boehm <[email protected]>
Committed: Thu Feb 15 22:51:48 2018 -0800

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


http://git-wip-us.apache.org/repos/asf/systemml/blob/de8f2c77/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 9b184b7..20cb955 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
@@ -414,7 +414,7 @@ public class PlanSelectionFuseCostBasedV2 extends 
PlanSelection
        
        private static double getSafeMemEst(Hop hop) {
                return !hop.dimsKnown() ? getSize(hop) * 8
-                       : hop.getMemEstimate();
+                       : hop.getOutputMemEstimate();
        }
        
        private static long getSize(Hop hop) {

Reply via email to