Repository: systemml Updated Branches: refs/heads/master bba7236fb -> 7aa9cca7b
[MINOR] Fix codegen cost model (missing ifelse, warn on stats overflow) Project: http://git-wip-us.apache.org/repos/asf/systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/7aa9cca7 Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/7aa9cca7 Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/7aa9cca7 Branch: refs/heads/master Commit: 7aa9cca7bb4d3685a6b1b3b5bb30fb092fa0ab48 Parents: bba7236 Author: Matthias Boehm <[email protected]> Authored: Tue Feb 13 15:17:45 2018 -0800 Committer: Matthias Boehm <[email protected]> Committed: Tue Feb 13 15:17:45 2018 -0800 ---------------------------------------------------------------------- .../sysml/hops/codegen/opt/PlanSelectionFuseCostBasedV2.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/systemml/blob/7aa9cca7/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 aa1082e..9b184b7 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 @@ -147,8 +147,12 @@ public class PlanSelectionFuseCostBasedV2 extends PlanSelection memo.setDistinct(e.getKey(), e.getValue()); //maintain statistics - if( DMLScript.STATISTICS ) + if( DMLScript.STATISTICS ) { + if( sumMatPoints >= 63 ) + LOG.warn("Long overflow on maintaining codegen statistics " + + "for a DAG with "+sumMatPoints+" interesting points."); Statistics.incrementCodegenEnumAll(UtilFunctions.pow(2, sumMatPoints)); + } } private void selectPlans(CPlanMemoTable memo, PlanPartition part) @@ -1033,6 +1037,7 @@ public class PlanSelectionFuseCostBasedV2 extends PlanSelection } else if( current instanceof TernaryOp ) { switch( ((TernaryOp)current).getOp() ) { + case IFELSE: case PLUS_MULT: case MINUS_MULT: costs = 2; break; case CTABLE: costs = 3; break;
