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 2018/03/04 21:37:00 UTC

[jira] [Commented] (SYSTEMML-2168) New rewrite for removal of unnecessary right indexing

    [ https://issues.apache.org/jira/browse/SYSTEMML-2168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385399#comment-16385399 ] 

Matthias Boehm commented on SYSTEMML-2168:
------------------------------------------

[~lahiru94] thanks for your interest - this task here might be a good starting point for you as it is well-isolated but will get you in touch with the compiler of SystemML.

> New rewrite for removal of unnecessary right indexing
> -----------------------------------------------------
>
>                 Key: SYSTEMML-2168
>                 URL: https://issues.apache.org/jira/browse/SYSTEMML-2168
>             Project: SystemML
>          Issue Type: Task
>            Reporter: Matthias Boehm
>            Priority: Major
>              Labels: beginner
>
> In several algorithms like {{scripts/algorithms/GLM-predict.dml}}, we see unnecessary right indexing operations that are not yet automatically removed. For example, in the following script
> {code}
> y_prob [, 1]  = exp (linear_terms);
> y_prob [, 2]  = 1.0 - y_prob [, 1];
> {code}
> the second access to {{y_prob [, 1]}} causes an unnecessary indexing operation and intermediate. We should rewrite this pattern to directly consume the output from {{exp (linear_terms)}} instead.
> In detail, this task entails the following steps, which might be a good opportunity to get in touch with SystemML's internal representation of high-level operators:
> * Create a new test case for this rewrite in package {{org.apache.sysml.test.integration.functions.misc}} similar to other test classes prefixed with {{Rewrite*}}.
> * Add a new rewrite to {{RewriteAlgebraicSimplificationDynamic}} to recognize the pattern of {{Indexing(LeftIndexing(X, y, indexrange1),indexrange2)}} with {{indexrange1==indexrange2}} and rewrite this to {{y}}. Note that there is a rewrite that replaces two subsequent leftindexing operations with an append, so this new rewrite should be invoked before {{fuseLeftIndexingChainToAppend}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)