From issues-return-7955-archive-asf-public=cust-asf.ponee.io@systemml.apache.org Mon Mar 5 07:05:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1AB8A180608 for ; Mon, 5 Mar 2018 07:05:03 +0100 (CET) Received: (qmail 86399 invoked by uid 500); 5 Mar 2018 06:05:03 -0000 Mailing-List: contact issues-help@systemml.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@systemml.apache.org Delivered-To: mailing list issues@systemml.apache.org Received: (qmail 86389 invoked by uid 99); 5 Mar 2018 06:05:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Mar 2018 06:05:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 91742C2EB8 for ; Mon, 5 Mar 2018 06:05:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id BiZ7ucgCnoAM for ; Mon, 5 Mar 2018 06:05:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3FBEB5FAC6 for ; Mon, 5 Mar 2018 06:05:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 64F30E0112 for ; Mon, 5 Mar 2018 06:05:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0B95121260 for ; Mon, 5 Mar 2018 06:05:00 +0000 (UTC) Date: Mon, 5 Mar 2018 06:05:00 +0000 (UTC) From: "Lahiru de Alwis (JIRA)" To: issues@systemml.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SYSTEMML-2168) New rewrite for removal of unnecessary right indexing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SYSTEMML-2168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385640#comment-16385640 ] Lahiru de Alwis commented on SYSTEMML-2168: ------------------------------------------- [~mboehm7] Thanks, I'd like to take up this task. > 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)