You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by mb...@apache.org on 2018/02/23 22:57:51 UTC

systemml git commit: [SYSTEMML-2161] Fix codegen optimizer cost vector memoization

Repository: systemml
Updated Branches:
  refs/heads/master f2fbd99e7 -> 53175c00e


[SYSTEMML-2161] Fix codegen optimizer cost vector memoization

Due to a recent change from 1- to 0-based ID Sequences in SystemML,
there occurred special cases where collisions of memoized cost vectors
led to suboptimal codegen plans. For ALS-CG on the ultra-sparse amazon
dataset, this affected end-to-end performance by more than 2x because it
turned led to a sparse-unsafe fused operator.
 

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

Branch: refs/heads/master
Commit: 53175c00ec4738138985630b888d9b337d7a2ed4
Parents: f2fbd99
Author: Matthias Boehm <mb...@gmail.com>
Authored: Fri Feb 23 14:05:02 2018 -0800
Committer: Matthias Boehm <mb...@gmail.com>
Committed: Fri Feb 23 14:05:02 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/53175c00/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 6f34497..e334d8d 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
@@ -902,7 +902,7 @@ public class PlanSelectionFuseCostBasedV2 extends PlanSelection
 		//computation without double counting materialized results or compute
 		//costs of complex operation DAGs within a single fused operator
 		if( !visited.add(new VisitMarkCost(currentHopId, 
-			(costsCurrent==null || currentType==TemplateType.MAGG)?0:costsCurrent.ID)) )
+			(costsCurrent==null || currentType==TemplateType.MAGG)?-1:costsCurrent.ID)) )
 			return 0; //already existing 
 		
 		//open template if necessary, including memoization