Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BFA55200D27 for ; Wed, 25 Oct 2017 22:48:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BE05F1609CE; Wed, 25 Oct 2017 20:48:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DD143160BDA for ; Wed, 25 Oct 2017 22:48:58 +0200 (CEST) Received: (qmail 95694 invoked by uid 500); 25 Oct 2017 20:48:58 -0000 Mailing-List: contact dev-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 dev@systemml.apache.org Received: (qmail 95681 invoked by uid 99); 25 Oct 2017 20:48:57 -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; Wed, 25 Oct 2017 20:48:57 +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 F22E1C1015 for ; Wed, 25 Oct 2017 20:48:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.129 X-Spam-Level: *** X-Spam-Status: No, score=3.129 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_REPLY=1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=googlemail.com 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 UbGnpB-KcWaj for ; Wed, 25 Oct 2017 20:48:55 +0000 (UTC) Received: from mail-ua0-f178.google.com (mail-ua0-f178.google.com [209.85.217.178]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id C4F395F5B4 for ; Wed, 25 Oct 2017 20:48:54 +0000 (UTC) Received: by mail-ua0-f178.google.com with SMTP id n22so969337uaj.13 for ; Wed, 25 Oct 2017 13:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=0NUSDPSp8lhP1n4OwbeaHxQvOxe/SN33LfNv9psg3ro=; b=ldOXculO6EuHctn1axXxSOXkLoRm0Y4VF8rKq1xau0AVMW25eiBBBnndAsxysF35oN 5djlK554rOH9MRysR0cPKDqZgFe47AiHuIqI4+EU6MHLK2VB9AFut0ZHaKJlw556Aclb goj6qHjrO/mgenesvb5ek3WA5X9gyAJ6Npr4O0R/R3JYHkv7Hue19EJmS668cWgGSWs2 ZbZIA1y2/e8yQhgveurchTXb7D9kzxomIZNTH21biZHDxPeaKBHJDy039RY/npDsA/Oc hBb4nadyuWYSEP7oXYXJy5Frgl0/2/EGplKa8whB2y+7RWuMplwmfPj5OhkCyCP07G4X ZBGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=0NUSDPSp8lhP1n4OwbeaHxQvOxe/SN33LfNv9psg3ro=; b=H/oeEDEXtO8G67IN0iuQM46tCEbMaNAOJMVI/Cp0livR5MBIQhdA9UZ6mWUfeYvjGN VrOSEM2iOM7Avn0ansPmUh5yLdRKfzAyk2ebDr0Vy4FfluhyrGmhy0nMMhj9AQ6fIgqV JofC0YglRUf/9O7GdDBQB/ipK713e0ERO3Tv6ORNRh4jHLVUsMztNMCXpUQIBBn0mDl6 Uk3F5nLwJ+sepaU2Y2J4YmPU+qgkII0Ii9gAUR9oa6ulZ+eWH4PTQo8m650C5o9GNTWk tnogRgK6OcP/1ypIHK/e+yKq6iLCvwIEMHWhhEFPC9Cw/LGcFbKQx0lqQi4u4X/4Cay0 6FFA== X-Gm-Message-State: AMCzsaWuhmGXfB8PMSkL1LaQj2Xr+SBiBLO1qqQ6ry834y9hNc/Uh3lP GPIaGyqMcDOQbAZkW3FqFzyVisZSXokEx4fa2zs3 X-Google-Smtp-Source: ABhQp+Qs7DTHDB+ZMDeVjqnYJEfS5s8Ol5UrVNVxu5u7HagZxwDTcwk7navKPTO07yAFODzLetzjtANB6l1p5ll9LLs= X-Received: by 10.159.58.76 with SMTP id r12mr2733358uag.141.1508964533520; Wed, 25 Oct 2017 13:48:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.23.24 with HTTP; Wed, 25 Oct 2017 13:48:53 -0700 (PDT) From: Matthias Boehm Date: Wed, 25 Oct 2017 13:48:53 -0700 Message-ID: Subject: Re: Get plans before and after rewrites To: dev@systemml.apache.org Content-Type: multipart/alternative; boundary="089e08e4b65dffcd9e055c652e32" archived-at: Wed, 25 Oct 2017 20:48:59 -0000 --089e08e4b65dffcd9e055c652e32 Content-Type: text/plain; charset="UTF-8" Hi Nantia, sure, let me clarify these two statements: 1) Optimization level: When I said O1, I was referring to SystemML's configurable optimization level 1, which can be set through 'sysml.optlevel' (or 'optlevel' in SystemML 0.14) in a SystemML-config.xml file or via setConfigProperty in MLContext. By default we use O2 with all rewrites enabled, in O1, certain rewrites are disabled, which allows comparing plans with and without rewrites. Furthermore, the quoted statement below was more of a note for myself, to cleanup this handling of remaining rewrites (that are not conditionally disabled yet) in an upcoming SystemML release. 2) Log4j Configuration: You can take the log4j properties file from our conf directory, put it into your classpath, and append the following line to this file (alternatively with TRACE instead of DEBUG if you want to see more details): log4j.logger.org.apache.sysml.hops.rewrite=DEBUG Regards, Matthias On Wed, Oct 25, 2017 at 4:24 AM, Nantia Makrynioti wrote: > Hello Matthias, > > Thanks a lot for replying and sorry for my late response. > > I have two more questions regarding the steps you described. > > I think it's a > > good idea to clean this up (disable these remaining rewrites in O1 as > > well), which would be useful for debugging. > > > I don't understand what you mean by O1. So how can I disable these > remaining rewrites? > > If you're debugging any specific issue and want to see which rewrites > > trigger where, you can set the log level for package > > 'org.apache.sysml.hops.rewrite' to DEBUG or TRACE in your log4j > > configuration. > > > I am working with SystemML 0.14.0. There is a log4j.properties file, but I > cannot find anything relevant to 'org.apache.sysml.hops.rewrite'. Is > there > another file I should check? > > Thanks again, > Nantia > > 2017-10-13 23:29 GMT+03:00 Matthias Boehm : > > > Hi Nantia, > > > > in optimization level 1, we disable the following rewrites and the > explain > > hops or runtime output will show the resulting plan: > > * Disable common-subexpression elimination > > * Disable algebraic simplifications (static and dynamic) > > * Disable inter-procedural analysis > > * Disable branch removal and statement block merge > > * Disable sum-product rewrites > > * Disable update-in-place rewrites > > > > So, to compare plans without and with rewrites, you would need to run > with > > optimization level 1 and 2 (our default), and capture & compare these > > outputs. > > > > Note that there are a number of rewrites such as matrix multiplication > > chain optimization, operator selection, hop-lop rewrites that are always > > applied and thus not affected by the optimization level. I think it's a > > good idea to clean this up (disable these remaining rewrites in O1 as > > well), which would be useful for debugging. > > > > If you're debugging any specific issue and want to see which rewrites > > trigger where, you can set the log level for package > > 'org.apache.sysml.hops.rewrite' to DEBUG or TRACE in your log4j > > configuration. If you're compiling from sources, you can also simply set > > ProgramRewriter.LDEBUG to true to do the same thing. > > > > Regards, > > Matthias > > > > On Fri, Oct 13, 2017 at 2:04 AM, Nantia Makrynioti > > > wrote: > > > > > Hello, > > > > > > I set optimization level to 1 in SystemML-config.xml, in order to get > HOP > > > and LOP plans before and after rewrites. However, I am still getting > > just a > > > single plan. > > > > > > I am using spark shell to execute the dml script. > > > > > > Thank you in advance, > > > Nantia > > > > > > --089e08e4b65dffcd9e055c652e32--