Repository: systemml Updated Branches: refs/heads/master 856230c56 -> 5b0a292d4
[HOTFIX][SYSTEMML-1787] Fix rewrite utils (row/column indexing checks) This patch fixes a recently introduced issue in our hop rewrite utils for determining full row or column indexing. Although the size conditions were correct they lead to incorrectly applied rewrites whenever hops have temporarily incorrect size information. Hence, we now revert this modification back to the more conservative check without size information. Project: http://git-wip-us.apache.org/repos/asf/systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/5b0a292d Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/5b0a292d Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/5b0a292d Branch: refs/heads/master Commit: 5b0a292d481c11e47d57170b88564e5ff6ee74a2 Parents: 856230c Author: Matthias Boehm <[email protected]> Authored: Sun Jul 23 11:26:12 2017 -0700 Committer: Matthias Boehm <[email protected]> Committed: Sun Jul 23 11:26:12 2017 -0700 ---------------------------------------------------------------------- .../org/apache/sysml/hops/rewrite/HopRewriteUtils.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/systemml/blob/5b0a292d/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteUtils.java b/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteUtils.java index bc6d22c..3530142 100644 --- a/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteUtils.java +++ b/src/main/java/org/apache/sysml/hops/rewrite/HopRewriteUtils.java @@ -906,16 +906,17 @@ public class HopRewriteUtils public static boolean isFullColumnIndexing(LeftIndexingOp hop) { return hop.isColLowerEqualsUpper() - && ((isLiteralOfValue(hop.getInput().get(2), 1) - && isLiteralOfValue(hop.getInput().get(3), hop.getDim1())) - || hop.getDim1() == hop.getInput().get(0).getDim1()); + && isLiteralOfValue(hop.getInput().get(2), 1) + && isLiteralOfValue(hop.getInput().get(3), hop.getDim1()); + //TODO extend by input/output size conditions, which are currently + //invalid due to temporarily incorrect size information } public static boolean isFullRowIndexing(LeftIndexingOp hop) { return hop.isRowLowerEqualsUpper() - && ((isLiteralOfValue(hop.getInput().get(4), 1) - && isLiteralOfValue(hop.getInput().get(5), hop.getDim2())) - || hop.getDim2() == hop.getInput().get(0).getDim2()); + && isLiteralOfValue(hop.getInput().get(4), 1) + && isLiteralOfValue(hop.getInput().get(5), hop.getDim2()); + //TODO extend by input/output size conditions (see above) } public static boolean isColumnRangeIndexing(IndexingOp hop) {
