Repository: systemml
Updated Branches:
  refs/heads/master 437e9d661 -> bc4acdfab


http://git-wip-us.apache.org/repos/asf/systemml/blob/41e3325f/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmMSVM.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmMSVM.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmMSVM.java
index eef66c8..1a90777 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmMSVM.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmMSVM.java
@@ -38,20 +38,29 @@ public class AlgorithmMSVM extends AutomatedTestBase
        private final static String TEST_NAME1 = "Algorithm_MSVM";
        private final static String TEST_DIR = "functions/codegenalg/";
        private final static String TEST_CLASS_DIR = TEST_DIR + 
AlgorithmMSVM.class.getSimpleName() + "/";
-       private final static String TEST_CONF = "SystemML-config-codegen.xml";
-       private final static File   TEST_CONF_FILE = new File(SCRIPT_DIR + 
TEST_DIR, TEST_CONF);
-       
+       private final static String TEST_CONF_DEFAULT = 
"SystemML-config-codegen.xml";
+       private final static File TEST_CONF_FILE_DEFAULT = new File(SCRIPT_DIR 
+ TEST_DIR, TEST_CONF_DEFAULT);
+       private final static String TEST_CONF_FUSE_ALL = 
"SystemML-config-codegen-fuse-all.xml";
+       private final static File TEST_CONF_FILE_FUSE_ALL = new File(SCRIPT_DIR 
+ TEST_DIR, TEST_CONF_FUSE_ALL);
+       private final static String TEST_CONF_FUSE_NO_REDUNDANCY = 
"SystemML-config-codegen-fuse-no-redundancy.xml";
+       private final static File TEST_CONF_FILE_FUSE_NO_REDUNDANCY = new 
File(SCRIPT_DIR + TEST_DIR,
+                       TEST_CONF_FUSE_NO_REDUNDANCY);
+
+       private enum TestType { DEFAULT,FUSE_ALL,FUSE_NO_REDUNDANCY }
+
        private final static double eps = 1e-5;
        
        private final static int rows = 1468;
        private final static int cols = 1007;
-               
+       
        private final static double sparsity1 = 0.7; //dense
        private final static double sparsity2 = 0.1; //sparse
        
        private final static int intercept = 0;
        private final static double epsilon = 0.000000001;
        private final static double maxiter = 10;
+
+       private TestType currentTestType = TestType.DEFAULT;
        
        @Override
        public void setUp() {
@@ -61,45 +70,85 @@ public class AlgorithmMSVM extends AutomatedTestBase
 
        @Test
        public void testMSVMDenseBinRewritesCP() {
-               runMSVMTest(TEST_NAME1, true, false, 2, ExecType.CP);
+               runMSVMTest(TEST_NAME1, true, false, 2, ExecType.CP, 
TestType.DEFAULT);
        }
        
        @Test
        public void testMSVMSparseBinRewritesCP() {
-               runMSVMTest(TEST_NAME1, true, true, 2, ExecType.CP);
+               runMSVMTest(TEST_NAME1, true, true, 2, ExecType.CP, 
TestType.DEFAULT);
        }
        
        @Test
        public void testMSVMDenseBinCP() {
-               runMSVMTest(TEST_NAME1, false, false, 2, ExecType.CP);
+               runMSVMTest(TEST_NAME1, false, false, 2, ExecType.CP, 
TestType.DEFAULT);
        }
        
        @Test
        public void testMSVMSparseBinCP() {
-               runMSVMTest(TEST_NAME1, false, true, 2, ExecType.CP);
+               runMSVMTest(TEST_NAME1, false, true, 2, ExecType.CP, 
TestType.DEFAULT);
        }
        
        @Test
        public void testMSVMDenseMulRewritesCP() {
-               runMSVMTest(TEST_NAME1, true, false, 4, ExecType.CP);
+               runMSVMTest(TEST_NAME1, true, false, 4, ExecType.CP, 
TestType.DEFAULT);
        }
        
        @Test
        public void testMSVMSparseMulRewritesCP() {
-               runMSVMTest(TEST_NAME1, true, true, 4, ExecType.CP);
+               runMSVMTest(TEST_NAME1, true, true, 4, ExecType.CP, 
TestType.DEFAULT);
        }
        
        @Test
        public void testMSVMDenseMulCP() {
-               runMSVMTest(TEST_NAME1, false, false, 4, ExecType.CP);
+               runMSVMTest(TEST_NAME1, false, false, 4, ExecType.CP, 
TestType.DEFAULT);
        }
        
        @Test
        public void testMSVMSparseMulCP() {
-               runMSVMTest(TEST_NAME1, false, true, 4, ExecType.CP);
+               runMSVMTest(TEST_NAME1, false, true, 4, ExecType.CP, 
TestType.DEFAULT);
        }
-       
-       private void runMSVMTest( String testname, boolean rewrites, boolean 
sparse, int numClasses, ExecType instType)
+
+       @Test
+       public void testMSVMDenseBinRewritesCPFuseAll() {
+               runMSVMTest(TEST_NAME1, true, false, 2, ExecType.CP, 
TestType.FUSE_ALL);
+       }
+
+       @Test
+       public void testMSVMSparseBinRewritesCPFuseAll() {
+               runMSVMTest(TEST_NAME1, true, true, 2, ExecType.CP, 
TestType.FUSE_ALL);
+       }
+
+       @Test
+       public void testMSVMDenseMulRewritesCPFuseAll() {
+               runMSVMTest(TEST_NAME1, true, false, 4, ExecType.CP, 
TestType.FUSE_ALL);
+       }
+
+       @Test
+       public void testMSVMSparseMulRewritesCPFuseAll() {
+               runMSVMTest(TEST_NAME1, true, true, 4, ExecType.CP, 
TestType.FUSE_ALL);
+       }
+
+       @Test
+       public void testMSVMDenseBinRewritesCPFuseNoRedundancy() {
+               runMSVMTest(TEST_NAME1, true, false, 2, ExecType.CP, 
TestType.FUSE_NO_REDUNDANCY);
+       }
+
+       @Test
+       public void testMSVMSparseBinRewritesCPFuseNoRedundancy() {
+               runMSVMTest(TEST_NAME1, true, true, 2, ExecType.CP, 
TestType.FUSE_NO_REDUNDANCY);
+       }
+
+       @Test
+       public void testMSVMDenseMulRewritesCPFuseNoRedundancy() {
+               runMSVMTest(TEST_NAME1, true, false, 4, ExecType.CP, 
TestType.FUSE_NO_REDUNDANCY);
+       }
+
+       @Test
+       public void testMSVMSparseMulRewritesCPFuseNoRedundancy() {
+               runMSVMTest(TEST_NAME1, true, true, 4, ExecType.CP, 
TestType.FUSE_NO_REDUNDANCY);
+       }
+
+       private void runMSVMTest( String testname, boolean rewrites, boolean 
sparse, int numClasses, ExecType instType, TestType testType)
        {
                boolean oldFlag = OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION;
                RUNTIME_PLATFORM platformOld = rtplatform;
@@ -108,7 +157,7 @@ public class AlgorithmMSVM extends AutomatedTestBase
                        case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
                        default: rtplatform = RUNTIME_PLATFORM.HYBRID_SPARK; 
break;
                }
-       
+               currentTestType = testType;
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
                if( rtplatform == RUNTIME_PLATFORM.SPARK || rtplatform == 
RUNTIME_PLATFORM.HYBRID_SPARK )
                        DMLScript.USE_LOCAL_SPARK_CONFIG = true;
@@ -160,7 +209,16 @@ public class AlgorithmMSVM extends AutomatedTestBase
        @Override
        protected File getConfigTemplateFile() {
                // Instrumentation in this test's output log to show custom 
configuration file used for template.
-               System.out.println("This test case overrides default 
configuration with " + TEST_CONF_FILE.getPath());
-               return TEST_CONF_FILE;
+               String message = "This test case overrides default 
configuration with ";
+               if(currentTestType == TestType.FUSE_ALL){
+                       System.out.println(message + 
TEST_CONF_FILE_FUSE_ALL.getPath());
+                       return TEST_CONF_FILE_FUSE_ALL;
+               } else if(currentTestType == TestType.FUSE_NO_REDUNDANCY){
+                       System.out.println(message + 
TEST_CONF_FILE_FUSE_NO_REDUNDANCY.getPath());
+                       return TEST_CONF_FILE_FUSE_NO_REDUNDANCY;
+               } else {
+                       System.out.println(message + 
TEST_CONF_FILE_DEFAULT.getPath());
+                       return TEST_CONF_FILE_DEFAULT;
+               }
        }
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/41e3325f/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmPNMF.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmPNMF.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmPNMF.java
index eb47100..19f943a 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmPNMF.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmPNMF.java
@@ -38,21 +38,30 @@ public class AlgorithmPNMF extends AutomatedTestBase
        private final static String TEST_NAME1 = "Algorithm_PNMF";
        private final static String TEST_DIR = "functions/codegenalg/";
        private final static String TEST_CLASS_DIR = TEST_DIR + 
AlgorithmPNMF.class.getSimpleName() + "/";
-       private final static String TEST_CONF = "SystemML-config-codegen.xml";
-       private final static File   TEST_CONF_FILE = new File(SCRIPT_DIR + 
TEST_DIR, TEST_CONF);
-       
+       private final static String TEST_CONF_DEFAULT = 
"SystemML-config-codegen.xml";
+       private final static File TEST_CONF_FILE_DEFAULT = new File(SCRIPT_DIR 
+ TEST_DIR, TEST_CONF_DEFAULT);
+       private final static String TEST_CONF_FUSE_ALL = 
"SystemML-config-codegen-fuse-all.xml";
+       private final static File TEST_CONF_FILE_FUSE_ALL = new File(SCRIPT_DIR 
+ TEST_DIR, TEST_CONF_FUSE_ALL);
+       private final static String TEST_CONF_FUSE_NO_REDUNDANCY = 
"SystemML-config-codegen-fuse-no-redundancy.xml";
+       private final static File TEST_CONF_FILE_FUSE_NO_REDUNDANCY = new 
File(SCRIPT_DIR + TEST_DIR,
+                       TEST_CONF_FUSE_NO_REDUNDANCY);
+
+       private enum TestType { DEFAULT,FUSE_ALL,FUSE_NO_REDUNDANCY }
+
        private final static double eps = 1e-5;
        
        private final static int rows = 1468;
        private final static int cols = 1207;
        private final static int rank = 20;
-               
+       
        private final static double sparsity1 = 0.7; //dense
        private final static double sparsity2 = 0.1; //sparse
        
        private final static double epsilon = 0.000000001;
        private final static double maxiter = 10;
        
+       private TestType currentTestType = TestType.DEFAULT;
+       
        @Override
        public void setUp() {
                TestUtils.clearAssertionInformation();
@@ -61,12 +70,32 @@ public class AlgorithmPNMF extends AutomatedTestBase
 
        @Test
        public void testPNMFDenseCP() {
-               runPNMFTest(TEST_NAME1, false, false, ExecType.CP);
+               runPNMFTest(TEST_NAME1, false, false, ExecType.CP, 
TestType.DEFAULT);
        }
        
        @Test
        public void testPNMFSparseCP() {
-               runPNMFTest(TEST_NAME1, false, true, ExecType.CP);
+               runPNMFTest(TEST_NAME1, false, true, ExecType.CP, 
TestType.DEFAULT);
+       }
+
+       @Test
+       public void testPNMFDenseCPFuseAll() {
+               runPNMFTest(TEST_NAME1, false, false, ExecType.CP, 
TestType.FUSE_ALL);
+       }
+
+       @Test
+       public void testPNMFSparseCPFuseAll() {
+               runPNMFTest(TEST_NAME1, false, true, ExecType.CP, 
TestType.FUSE_ALL);
+       }
+
+       @Test
+       public void testPNMFDenseCPFuseNoRedundancy() {
+               runPNMFTest(TEST_NAME1, false, false, ExecType.CP, 
TestType.FUSE_NO_REDUNDANCY);
+       }
+
+       @Test
+       public void testPNMFSparseCPFuseNoRedundancy() {
+               runPNMFTest(TEST_NAME1, false, true, ExecType.CP, 
TestType.FUSE_NO_REDUNDANCY);
        }
        
        //TODO requires proper handling of blocksize constraints
@@ -80,7 +109,7 @@ public class AlgorithmPNMF extends AutomatedTestBase
        //      runPNMFTest(TEST_NAME1, false, true, ExecType.SPARK);
        //}
 
-       private void runPNMFTest( String testname, boolean rewrites, boolean 
sparse, ExecType instType)
+       private void runPNMFTest( String testname, boolean rewrites, boolean 
sparse, ExecType instType, TestType testType)
        {
                boolean oldFlag = OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION;
                RUNTIME_PLATFORM platformOld = rtplatform;
@@ -89,7 +118,7 @@ public class AlgorithmPNMF extends AutomatedTestBase
                        case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
                        default: rtplatform = RUNTIME_PLATFORM.HYBRID_SPARK; 
break;
                }
-       
+               currentTestType = testType;
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
                if( rtplatform == RUNTIME_PLATFORM.SPARK || rtplatform == 
RUNTIME_PLATFORM.HYBRID_SPARK )
                        DMLScript.USE_LOCAL_SPARK_CONFIG = true;
@@ -146,7 +175,16 @@ public class AlgorithmPNMF extends AutomatedTestBase
        @Override
        protected File getConfigTemplateFile() {
                // Instrumentation in this test's output log to show custom 
configuration file used for template.
-               System.out.println("This test case overrides default 
configuration with " + TEST_CONF_FILE.getPath());
-               return TEST_CONF_FILE;
+               String message = "This test case overrides default 
configuration with ";
+               if(currentTestType == TestType.FUSE_ALL){
+                       System.out.println(message + 
TEST_CONF_FILE_FUSE_ALL.getPath());
+                       return TEST_CONF_FILE_FUSE_ALL;
+               } else if(currentTestType == TestType.FUSE_NO_REDUNDANCY){
+                       System.out.println(message + 
TEST_CONF_FILE_FUSE_NO_REDUNDANCY.getPath());
+                       return TEST_CONF_FILE_FUSE_NO_REDUNDANCY;
+               } else {
+                       System.out.println(message + 
TEST_CONF_FILE_DEFAULT.getPath());
+                       return TEST_CONF_FILE_DEFAULT;
+               }
        }
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/41e3325f/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmStepwiseRegression.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmStepwiseRegression.java
 
b/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmStepwiseRegression.java
index d0acd62..fb68ab8 100644
--- 
a/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmStepwiseRegression.java
+++ 
b/src/test/java/org/apache/sysml/test/integration/functions/codegenalg/AlgorithmStepwiseRegression.java
@@ -36,9 +36,16 @@ public class AlgorithmStepwiseRegression extends 
AutomatedTestBase
        private final static String TEST_NAME1 = "Algorithm_Stepwise";
        private final static String TEST_DIR = "functions/codegenalg/";
        private final static String TEST_CLASS_DIR = TEST_DIR + 
AlgorithmStepwiseRegression.class.getSimpleName() + "/";
-       private final static String TEST_CONF = "SystemML-config-codegen.xml";
-       private final static File   TEST_CONF_FILE = new File(SCRIPT_DIR + 
TEST_DIR, TEST_CONF);
-       
+       private final static String TEST_CONF_DEFAULT = 
"SystemML-config-codegen.xml";
+       private final static File TEST_CONF_FILE_DEFAULT = new File(SCRIPT_DIR 
+ TEST_DIR, TEST_CONF_DEFAULT);
+       private final static String TEST_CONF_FUSE_ALL = 
"SystemML-config-codegen-fuse-all.xml";
+       private final static File TEST_CONF_FILE_FUSE_ALL = new File(SCRIPT_DIR 
+ TEST_DIR, TEST_CONF_FUSE_ALL);
+       private final static String TEST_CONF_FUSE_NO_REDUNDANCY = 
"SystemML-config-codegen-fuse-no-redundancy.xml";
+       private final static File TEST_CONF_FILE_FUSE_NO_REDUNDANCY = new 
File(SCRIPT_DIR + TEST_DIR,
+                       TEST_CONF_FUSE_NO_REDUNDANCY);
+
+       private enum TestType { DEFAULT,FUSE_ALL,FUSE_NO_REDUNDANCY }
+
        private final static int rows = 2468;
        private final static int cols = 200;
        
@@ -53,6 +60,8 @@ public class AlgorithmStepwiseRegression extends 
AutomatedTestBase
                LINREG_DS,
        }
        
+       private TestType currentTestType = TestType.DEFAULT;
+       
        @Override
        public void setUp() {
                TestUtils.clearAssertionInformation();
@@ -61,22 +70,22 @@ public class AlgorithmStepwiseRegression extends 
AutomatedTestBase
 
        @Test
        public void testStepwiseGLMDenseRewritesCP() {
-               runStepwiseTest(StepwiseType.GLM_PROBIT, false, true, 
ExecType.CP);
+               runStepwiseTest(StepwiseType.GLM_PROBIT, false, true, 
ExecType.CP, TestType.DEFAULT);
        }
        
        @Test
        public void testStepwiseGLMSparseRewritesCP() {
-               runStepwiseTest(StepwiseType.GLM_PROBIT, true, true, 
ExecType.CP);
+               runStepwiseTest(StepwiseType.GLM_PROBIT, true, true, 
ExecType.CP, TestType.DEFAULT);
        }
        
        @Test
        public void testStepwiseGLMDenseNoRewritesCP() {
-               runStepwiseTest(StepwiseType.GLM_PROBIT, false, false, 
ExecType.CP);
+               runStepwiseTest(StepwiseType.GLM_PROBIT, false, false, 
ExecType.CP, TestType.DEFAULT);
        }
        
        @Test
        public void testStepwiseGLMSparseNoRewritesCP() {
-               runStepwiseTest(StepwiseType.GLM_PROBIT, true, false, 
ExecType.CP);
+               runStepwiseTest(StepwiseType.GLM_PROBIT, true, false, 
ExecType.CP, TestType.DEFAULT);
        }
        
 //     @Test
@@ -101,45 +110,66 @@ public class AlgorithmStepwiseRegression extends 
AutomatedTestBase
        
        @Test
        public void testStepwiseLinregDSDenseRewritesCP() {
-               runStepwiseTest(StepwiseType.LINREG_DS, false, true, 
ExecType.CP);
+               runStepwiseTest(StepwiseType.LINREG_DS, false, true, 
ExecType.CP, TestType.DEFAULT);
        }
        
        @Test
        public void testStepwiseLinregDSSparseRewritesCP() {
-               runStepwiseTest(StepwiseType.LINREG_DS, true, true, 
ExecType.CP);
+               runStepwiseTest(StepwiseType.LINREG_DS, true, true, 
ExecType.CP, TestType.DEFAULT);
        }
        
        @Test
        public void testStepwiseLinregDSDenseNoRewritesCP() {
-               runStepwiseTest(StepwiseType.LINREG_DS, false, false, 
ExecType.CP);
+               runStepwiseTest(StepwiseType.LINREG_DS, false, false, 
ExecType.CP, TestType.DEFAULT);
        }
        
        @Test
        public void testStepwiseLinregDSSparseNoRewritesCP() {
-               runStepwiseTest(StepwiseType.LINREG_DS, true, false, 
ExecType.CP);
+               runStepwiseTest(StepwiseType.LINREG_DS, true, false, 
ExecType.CP, TestType.DEFAULT);
        }
+
+       @Test
+       public void testStepwiseGLMDenseRewritesCPFuseAll() {
+               runStepwiseTest(StepwiseType.GLM_PROBIT, false, true, 
ExecType.CP, TestType.FUSE_ALL);
+       }
+
+       @Test
+       public void testStepwiseGLMSparseRewritesCPFuseAll() {
+               runStepwiseTest(StepwiseType.GLM_PROBIT, true, true, 
ExecType.CP, TestType.FUSE_ALL);
+       }
+
+       @Test
+       public void testStepwiseLinregDSDenseRewritesCPFuseAll() {
+               runStepwiseTest(StepwiseType.LINREG_DS, false, true, 
ExecType.CP, TestType.FUSE_ALL);
+       }
+
+       @Test
+       public void testStepwiseLinregDSSparseRewritesCPFuseAll() {
+               runStepwiseTest(StepwiseType.LINREG_DS, true, true, 
ExecType.CP, TestType.FUSE_ALL);
+       }
+
+       @Test
+       public void testStepwiseGLMDenseRewritesCPFuseNoRedundancy() {
+               runStepwiseTest(StepwiseType.GLM_PROBIT, false, true, 
ExecType.CP, TestType.FUSE_NO_REDUNDANCY);
+       }
+
+       @Test
+       public void testStepwiseGLMSparseRewritesCPFuseNoRedundancy() {
+               runStepwiseTest(StepwiseType.GLM_PROBIT, true, true, 
ExecType.CP, TestType.FUSE_NO_REDUNDANCY);
+       }
+
+       @Test
+       public void testStepwiseLinregDSDenseRewritesCPFuseNoRedundancy() {
+               runStepwiseTest(StepwiseType.LINREG_DS, false, true, 
ExecType.CP, TestType.FUSE_NO_REDUNDANCY);
+       }
+
+       @Test
+       public void testStepwiseLinregDSSparseRewritesCPFuseNoRedundancy() {
+               runStepwiseTest(StepwiseType.LINREG_DS, true, true, 
ExecType.CP, TestType.FUSE_NO_REDUNDANCY);
+       }
+
        
-//     @Test
-//     public void testStepwiseLinregDSDenseRewritesSP() {
-//             runStepwiseTest(StepwiseType.LINREG_DS, false, true, 
ExecType.SPARK);
-//     }
-//     
-//     @Test
-//     public void testStepwiseLinregDSSparseRewritesSP() {
-//             runStepwiseTest(StepwiseType.LINREG_DS, true, true, 
ExecType.SPARK);
-//     }
-//     
-//     @Test
-//     public void testStepwiseLinregDSDenseNoRewritesSP() {
-//             runStepwiseTest(StepwiseType.LINREG_DS, false, false, 
ExecType.SPARK);
-//     }
-//     
-//     @Test
-//     public void testStepwiseLinregDSSparseNoRewritesSP() {
-//             runStepwiseTest(StepwiseType.LINREG_DS, true, false, 
ExecType.SPARK);
-//     }
-       
-       private void runStepwiseTest( StepwiseType type, boolean sparse, 
boolean rewrites, ExecType instType)
+       private void runStepwiseTest( StepwiseType type, boolean sparse, 
boolean rewrites, ExecType instType, TestType testType)
        {
                boolean oldFlag = OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION;
                RUNTIME_PLATFORM platformOld = rtplatform;
@@ -147,7 +177,7 @@ public class AlgorithmStepwiseRegression extends 
AutomatedTestBase
                        case SPARK: rtplatform = RUNTIME_PLATFORM.SPARK; break;
                        default: rtplatform = RUNTIME_PLATFORM.HYBRID_SPARK; 
break;
                }
-       
+               currentTestType = testType;
                boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
                if( rtplatform == RUNTIME_PLATFORM.SPARK || rtplatform == 
RUNTIME_PLATFORM.HYBRID_SPARK )
                        DMLScript.USE_LOCAL_SPARK_CONFIG = true;
@@ -201,7 +231,16 @@ public class AlgorithmStepwiseRegression extends 
AutomatedTestBase
        @Override
        protected File getConfigTemplateFile() {
                // Instrumentation in this test's output log to show custom 
configuration file used for template.
-               System.out.println("This test case overrides default 
configuration with " + TEST_CONF_FILE.getPath());
-               return TEST_CONF_FILE;
+               String message = "This test case overrides default 
configuration with ";
+               if(currentTestType == TestType.FUSE_ALL){
+                       System.out.println(message + 
TEST_CONF_FILE_FUSE_ALL.getPath());
+                       return TEST_CONF_FILE_FUSE_ALL;
+               } else if(currentTestType == TestType.FUSE_NO_REDUNDANCY){
+                       System.out.println(message + 
TEST_CONF_FILE_FUSE_NO_REDUNDANCY.getPath());
+                       return TEST_CONF_FILE_FUSE_NO_REDUNDANCY;
+               } else {
+                       System.out.println(message + 
TEST_CONF_FILE_DEFAULT.getPath());
+                       return TEST_CONF_FILE_DEFAULT;
+               }
        }
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/41e3325f/src/test/scripts/functions/codegenalg/SystemML-config-codegen-fuse-all.xml
----------------------------------------------------------------------
diff --git 
a/src/test/scripts/functions/codegenalg/SystemML-config-codegen-fuse-all.xml 
b/src/test/scripts/functions/codegenalg/SystemML-config-codegen-fuse-all.xml
new file mode 100644
index 0000000..c2cff96
--- /dev/null
+++ b/src/test/scripts/functions/codegenalg/SystemML-config-codegen-fuse-all.xml
@@ -0,0 +1,28 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<root>
+   <sysml.localtmpdir>/tmp/systemml</sysml.localtmpdir>
+   <sysml.scratch>scratch_space</sysml.scratch>
+   <sysml.optlevel>7</sysml.optlevel>
+   <sysml.codegen.enabled>true</sysml.codegen.enabled>
+   <sysml.codegen.plancache>true</sysml.codegen.plancache>
+   <sysml.codegen.literals>1</sysml.codegen.literals>
+   <sysml.codegen.optimizer>fuse_all</sysml.codegen.optimizer>
+</root>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/systemml/blob/41e3325f/src/test/scripts/functions/codegenalg/SystemML-config-codegen-fuse-no-redundancy.xml
----------------------------------------------------------------------
diff --git 
a/src/test/scripts/functions/codegenalg/SystemML-config-codegen-fuse-no-redundancy.xml
 
b/src/test/scripts/functions/codegenalg/SystemML-config-codegen-fuse-no-redundancy.xml
new file mode 100644
index 0000000..9fd1897
--- /dev/null
+++ 
b/src/test/scripts/functions/codegenalg/SystemML-config-codegen-fuse-no-redundancy.xml
@@ -0,0 +1,28 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<root>
+   <sysml.localtmpdir>/tmp/systemml</sysml.localtmpdir>
+   <sysml.scratch>scratch_space</sysml.scratch>
+   <sysml.optlevel>7</sysml.optlevel>
+   <sysml.codegen.enabled>true</sysml.codegen.enabled>
+   <sysml.codegen.plancache>true</sysml.codegen.plancache>
+   <sysml.codegen.literals>1</sysml.codegen.literals>
+   <sysml.codegen.optimizer>fuse_no_redundancy</sysml.codegen.optimizer>
+</root>
\ No newline at end of file

Reply via email to