Repository: incubator-systemml Updated Branches: refs/heads/master 7a3e95716 -> f2a927f87
[MINOR] Fix robustness codegen cost-based plan selection (cost model) Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/f2a927f8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/f2a927f8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/f2a927f8 Branch: refs/heads/master Commit: f2a927f87d8d9f82bcd64e42d2eb5abb838d6085 Parents: 7a3e957 Author: Matthias Boehm <mboe...@gmail.com> Authored: Sun Apr 30 16:47:15 2017 -0700 Committer: Matthias Boehm <mboe...@gmail.com> Committed: Sun Apr 30 16:47:15 2017 -0700 ---------------------------------------------------------------------- .../hops/codegen/template/PlanSelectionFuseCostBased.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/f2a927f8/src/main/java/org/apache/sysml/hops/codegen/template/PlanSelectionFuseCostBased.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/hops/codegen/template/PlanSelectionFuseCostBased.java b/src/main/java/org/apache/sysml/hops/codegen/template/PlanSelectionFuseCostBased.java index 70a6086..ed6a080 100644 --- a/src/main/java/org/apache/sysml/hops/codegen/template/PlanSelectionFuseCostBased.java +++ b/src/main/java/org/apache/sysml/hops/codegen/template/PlanSelectionFuseCostBased.java @@ -725,7 +725,7 @@ public class PlanSelectionFuseCostBased extends PlanSelection rGetComputeCosts(c, partition, computeCosts); //get costs for given hop - double costs = 0; + double costs = 1; if( current instanceof UnaryOp ) { switch( ((UnaryOp)current).getOp() ) { case ABS: @@ -759,7 +759,7 @@ public class PlanSelectionFuseCostBased extends PlanSelection case CUMMAX: case CUMPROD: costs = 1; break; default: - throw new RuntimeException("Cost model not " + LOG.warn("Cost model not " + "implemented yet for: "+((UnaryOp)current).getOp()); } } @@ -803,7 +803,7 @@ public class PlanSelectionFuseCostBased extends PlanSelection break; case COVARIANCE: costs = 23; break; default: - throw new RuntimeException("Cost model not " + LOG.warn("Cost model not " + "implemented yet for: "+((BinaryOp)current).getOp()); } } @@ -826,7 +826,7 @@ public class PlanSelectionFuseCostBased extends PlanSelection break; case COVARIANCE: costs = 23; break; default: - throw new RuntimeException("Cost model not " + LOG.warn("Cost model not " + "implemented yet for: "+((TernaryOp)current).getOp()); } } @@ -849,7 +849,7 @@ public class PlanSelectionFuseCostBased extends PlanSelection case MIN: case MAX: costs = 1; break; default: - throw new RuntimeException("Cost model not " + LOG.warn("Cost model not " + "implemented yet for: "+((AggUnaryOp)current).getOp()); } }