You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Matthias Boehm (JIRA)" <ji...@apache.org> on 2017/06/19 03:35:00 UTC

[jira] [Updated] (SYSTEMML-1719) Common subexpression elimination for codegen plans

     [ https://issues.apache.org/jira/browse/SYSTEMML-1719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Boehm updated SYSTEMML-1719:
-------------------------------------
    Description: 
There are a number of scenarios, where the code generator currently produces suboptimal plans due to missing common subexpression elimination. This happens commonly for multi-aggregates:

{code}
public final class TMP32 extends SpoofMultiAggregate { 
  public TMP32() {
    super(AggOp.SUM,AggOp.SUM);
  }
  protected void genexec(double a, SideInput[] b, double[] scalars, double[] c, int m, int n, int rowIndex, int colIndex) { 
    double TMP26 = getValue(b[1], rowIndex);
    double TMP27 = getValue(b[0], rowIndex);
    double TMP28 = TMP26 + scalars[0] * TMP27;
    double TMP29 = TMP28 * TMP28;
    double TMP30 = getValue(b[0], rowIndex);
    double TMP31 = TMP30 * a;
    c[0] += TMP29;
    c[1] += TMP31;
  }
}
{code}

Beside these scenarios, common subexpression elimination would also help to achieve higher plan cache hit rates.


> Common subexpression elimination for codegen plans
> --------------------------------------------------
>
>                 Key: SYSTEMML-1719
>                 URL: https://issues.apache.org/jira/browse/SYSTEMML-1719
>             Project: SystemML
>          Issue Type: Sub-task
>          Components: Compiler, Runtime
>            Reporter: Matthias Boehm
>             Fix For: SystemML 0.14
>
>
> There are a number of scenarios, where the code generator currently produces suboptimal plans due to missing common subexpression elimination. This happens commonly for multi-aggregates:
> {code}
> public final class TMP32 extends SpoofMultiAggregate { 
>   public TMP32() {
>     super(AggOp.SUM,AggOp.SUM);
>   }
>   protected void genexec(double a, SideInput[] b, double[] scalars, double[] c, int m, int n, int rowIndex, int colIndex) { 
>     double TMP26 = getValue(b[1], rowIndex);
>     double TMP27 = getValue(b[0], rowIndex);
>     double TMP28 = TMP26 + scalars[0] * TMP27;
>     double TMP29 = TMP28 * TMP28;
>     double TMP30 = getValue(b[0], rowIndex);
>     double TMP31 = TMP30 * a;
>     c[0] += TMP29;
>     c[1] += TMP31;
>   }
> }
> {code}
> Beside these scenarios, common subexpression elimination would also help to achieve higher plan cache hit rates.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)