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 <nantiam...@gmail.com> 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 >