Search in sources :

Example 86 with TestConfiguration

use of org.apache.sysml.test.integration.TestConfiguration in project incubator-systemml by apache.

the class DataTypeCastingTest method setUp.

@Override
public void setUp() {
    addTestConfiguration(TEST_NAME1, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1, new String[] { "R" }));
    addTestConfiguration(TEST_NAME2, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME2, new String[] { "R" }));
}
Also used : TestConfiguration(org.apache.sysml.test.integration.TestConfiguration)

Example 87 with TestConfiguration

use of org.apache.sysml.test.integration.TestConfiguration in project incubator-systemml by apache.

the class FunctionInliningTest method setUp.

@Override
public void setUp() {
    addTestConfiguration(TEST_NAME1, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1, new String[] { "Rout" }));
    addTestConfiguration(TEST_NAME2, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME2, new String[] { "Rout" }));
    addTestConfiguration(TEST_NAME3, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME3, new String[] { "Rout" }));
}
Also used : TestConfiguration(org.apache.sysml.test.integration.TestConfiguration)

Example 88 with TestConfiguration

use of org.apache.sysml.test.integration.TestConfiguration in project incubator-systemml by apache.

the class FunctionReturnTest method runFunctionReturnTest.

private void runFunctionReturnTest(String testname, boolean IPA) {
    boolean oldIPA = OptimizerUtils.ALLOW_INTER_PROCEDURAL_ANALYSIS;
    OptimizerUtils.ALLOW_INTER_PROCEDURAL_ANALYSIS = IPA;
    try {
        TestConfiguration config = getTestConfiguration(testname);
        loadTestConfiguration(config);
        String HOME = SCRIPT_DIR + TEST_DIR;
        fullDMLScriptName = HOME + testname + ".dml";
        programArgs = new String[] { "-explain" };
        runTest(true, false, null, -1);
    } finally {
        OptimizerUtils.ALLOW_INTER_PROCEDURAL_ANALYSIS = oldIPA;
    }
}
Also used : TestConfiguration(org.apache.sysml.test.integration.TestConfiguration)

Example 89 with TestConfiguration

use of org.apache.sysml.test.integration.TestConfiguration in project incubator-systemml by apache.

the class FunctionReturnTest method setUp.

@Override
public void setUp() {
    addTestConfiguration(TEST_NAME1, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1, new String[] { "Rout" }));
    addTestConfiguration(TEST_NAME2, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME2, new String[] { "Rout" }));
}
Also used : TestConfiguration(org.apache.sysml.test.integration.TestConfiguration)

Example 90 with TestConfiguration

use of org.apache.sysml.test.integration.TestConfiguration in project incubator-systemml by apache.

the class IPAConstantFoldingScalarVariablePropagationTest method runIPAScalarVariablePropagationTest.

/**
 * Test for static rewrites + IPA second chance compilation to allow
 * for scalar propagation (IPA) of constant-folded DAG of literals
 * (static rewrites) made possible by an initial scalar propagation
 * (IPA).
 *
 * @param testname  The name of the test.
 * @param IPA_SECOND_CHANCE  Whether or not to use IPA second chance.
 */
private void runIPAScalarVariablePropagationTest(String testname, boolean IPA_SECOND_CHANCE) {
    // Save old settings
    int oldIPANumRep = OptimizerUtils.IPA_NUM_REPETITIONS;
    boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
    RUNTIME_PLATFORM platformOld = rtplatform;
    try {
        // Setup test
        TestConfiguration config = getTestConfiguration(testname);
        loadTestConfiguration(config);
        String HOME = SCRIPT_DIR + TEST_DIR;
        fullDMLScriptName = HOME + testname + ".dml";
        programArgs = new String[] { "-stats", "-explain", "recompile_hops" };
        OptimizerUtils.IPA_NUM_REPETITIONS = IPA_SECOND_CHANCE ? 2 : 1;
        DMLScript.USE_LOCAL_SPARK_CONFIG = true;
        rtplatform = RUNTIME_PLATFORM.HYBRID_SPARK;
        // Run test
        runTest(true, false, null, -1);
        // Check for correct number of compiled & executed Spark jobs
        // (MB: originally, this required a second chance, but not anymore)
        checkNumCompiledSparkInst(0);
        checkNumExecutedSparkInst(0);
    } finally {
        // Reset
        OptimizerUtils.IPA_NUM_REPETITIONS = oldIPANumRep;
        DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
        rtplatform = platformOld;
    }
}
Also used : RUNTIME_PLATFORM(org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM) TestConfiguration(org.apache.sysml.test.integration.TestConfiguration)

Aggregations

TestConfiguration (org.apache.sysml.test.integration.TestConfiguration)866 Test (org.junit.Test)299 CellIndex (org.apache.sysml.runtime.matrix.data.MatrixValue.CellIndex)201 RUNTIME_PLATFORM (org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM)171 MatrixCharacteristics (org.apache.sysml.runtime.matrix.MatrixCharacteristics)50 IOException (java.io.IOException)18 MatrixBlock (org.apache.sysml.runtime.matrix.data.MatrixBlock)14 Modulus (org.apache.sysml.runtime.functionobjects.Modulus)9 HashMap (java.util.HashMap)8 FrameBlock (org.apache.sysml.runtime.matrix.data.FrameBlock)8 DMLException (org.apache.sysml.api.DMLException)6 Random (java.util.Random)5 ValueType (org.apache.sysml.parser.Expression.ValueType)5 Date (java.util.Date)3 BufferedReader (java.io.BufferedReader)2 FileReader (java.io.FileReader)2 Connection (org.apache.sysml.api.jmlc.Connection)2 DMLConfig (org.apache.sysml.conf.DMLConfig)2 DMLProgram (org.apache.sysml.parser.DMLProgram)2 DMLTranslator (org.apache.sysml.parser.DMLTranslator)2