This is an automated email from the ASF dual-hosted git repository.
mboehm7 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git
The following commit(s) were added to refs/heads/main by this push:
new e131532 [SYSTEMDS-3264] Added missing recompile tests, fix size-expr
test
e131532 is described below
commit e13153250bf428eb16fa7b6d4cce3e021af5cadf
Author: Matthias Boehm <[email protected]>
AuthorDate: Sun Jan 23 16:16:09 2022 +0100
[SYSTEMDS-3264] Added missing recompile tests, fix size-expr test
This patch reintroduced the missing recompile test package to our
github workflows, and fixes a broken test accordingly.
---
.github/workflows/functionsTests.yml | 2 +-
src/main/java/org/apache/sysds/conf/CompilerConfig.java | 2 +-
src/main/java/org/apache/sysds/hops/rewrite/ProgramRewriter.java | 3 ++-
.../sysds/test/functions/recompile/RandJobRecompileTest.java | 9 +++++----
4 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/functionsTests.yml
b/.github/workflows/functionsTests.yml
index f33fdd0..baaf8fd 100644
--- a/.github/workflows/functionsTests.yml
+++ b/.github/workflows/functionsTests.yml
@@ -60,7 +60,7 @@ jobs:
"**.functions.builtin.part2.**",
"**.functions.frame.**,**.functions.indexing.**,**.functions.io.**,**.functions.iogen.**,**.functions.jmlc.**,**.functions.lineage.**",
"**.functions.dnn.**,**.functions.paramserv.**",
- "**.functions.misc.**,**.functions.mlcontext.**",
+
"**.functions.recompile.**,**.functions.misc.**,**.functions.mlcontext.**",
"**.functions.nary.**,**.functions.quaternary.**",
"**.functions.parfor.**,**.functions.pipelines.**,**.functions.privacy.**",
"**.functions.unary.scalar.**,**.functions.updateinplace.**,**.functions.vect.**",
diff --git a/src/main/java/org/apache/sysds/conf/CompilerConfig.java
b/src/main/java/org/apache/sysds/conf/CompilerConfig.java
index 3f5f901..28dbc7e 100644
--- a/src/main/java/org/apache/sysds/conf/CompilerConfig.java
+++ b/src/main/java/org/apache/sysds/conf/CompilerConfig.java
@@ -57,7 +57,7 @@ public class CompilerConfig
//statement blocks / program blocks. Since recompilation is
done on the granularity
//of program blocks this enables recompilation of subsequent
operations according
//to the actual output size. This rewrite might limit the
opportunity for piggybacking
- //and therefore should only be applied if dyanmic recompilation
is enabled as well.
+ //and therefore should only be applied if dynamic recompilation
is enabled as well.
ALLOW_INDIVIDUAL_SB_SPECIFIC_OPS,
//Enables common subexpression elimination in dags for
persistent reads based on
//filenames and other relevant read meta data. Disabled for
jmlc to allow binding of
diff --git a/src/main/java/org/apache/sysds/hops/rewrite/ProgramRewriter.java
b/src/main/java/org/apache/sysds/hops/rewrite/ProgramRewriter.java
index 2e3edb0..060605a 100644
--- a/src/main/java/org/apache/sysds/hops/rewrite/ProgramRewriter.java
+++ b/src/main/java/org/apache/sysds/hops/rewrite/ProgramRewriter.java
@@ -111,7 +111,8 @@ public class ProgramRewriter
_sbRuleSet.add( new
RewriteCompressedReblock() ); // Compression Rewrite
if( OptimizerUtils.ALLOW_SPLIT_HOP_DAGS )
_sbRuleSet.add( new
RewriteSplitDagUnknownCSVRead() ); //dependency: reblock, merge
blocks
- if(
ConfigurationManager.getCompilerConfigFlag(ConfigType.ALLOW_INDIVIDUAL_SB_SPECIFIC_OPS)
)
+ if( OptimizerUtils.ALLOW_SPLIT_HOP_DAGS &&
+
ConfigurationManager.getCompilerConfigFlag(ConfigType.ALLOW_INDIVIDUAL_SB_SPECIFIC_OPS)
)
_sbRuleSet.add( new
RewriteSplitDagDataDependentOperators() ); //dependency: merge blocks
if( OptimizerUtils.ALLOW_AUTO_VECTORIZATION )
_sbRuleSet.add( new
RewriteForLoopVectorization() ); //dependency: reblock (reblockop)
diff --git
a/src/test/java/org/apache/sysds/test/functions/recompile/RandJobRecompileTest.java
b/src/test/java/org/apache/sysds/test/functions/recompile/RandJobRecompileTest.java
index ed9174f..4faf3d6 100644
---
a/src/test/java/org/apache/sysds/test/functions/recompile/RandJobRecompileTest.java
+++
b/src/test/java/org/apache/sysds/test/functions/recompile/RandJobRecompileTest.java
@@ -61,13 +61,13 @@ public class RandJobRecompileTest extends AutomatedTestBase
private void runRandJobRecompileTest( boolean estSizeEval )
{
boolean oldFlagSizeEval =
OptimizerUtils.ALLOW_WORSTCASE_SIZE_EXPRESSION_EVALUATION;
+ boolean oldFlagSplit = OptimizerUtils.ALLOW_SPLIT_HOP_DAGS;
try
{
TestConfiguration config =
getTestConfiguration(TEST_NAME);
loadTestConfiguration(config);
- /* This is for running the junit test the new way,
i.e., construct the arguments directly */
String HOME = SCRIPT_DIR + TEST_DIR;
fullDMLScriptName = HOME + TEST_NAME + ".dml";
programArgs = new String[]{"-explain","-args",
input("X"), Integer.toString(rows), output("Z") };
@@ -76,6 +76,7 @@ public class RandJobRecompileTest extends AutomatedTestBase
rCmd = "Rscript" + " " + fullRScriptName + " " +
inputDir() + " " + expectedDir();
OptimizerUtils.ALLOW_WORSTCASE_SIZE_EXPRESSION_EVALUATION = estSizeEval;
+ OptimizerUtils.ALLOW_SPLIT_HOP_DAGS = false; //test
size eval in single program block
double[][] V = TestUtils.round( getRandomMatrix(rows,
cols, min, max, 1.0d, 7) );
writeInputMatrix("X", V, true);
@@ -90,14 +91,14 @@ public class RandJobRecompileTest extends AutomatedTestBase
//check expected number of compiled and executed Spark
jobs
int expectedNumCompiled = (estSizeEval?1:3); //rbl,
rand, write
- int expectedNumExecuted = 0;
+ int expectedNumExecuted = (estSizeEval?0:1);
checkNumCompiledSparkInst(expectedNumCompiled);
checkNumExecutedSparkInst(expectedNumExecuted);
}
- finally
- {
+ finally {
OptimizerUtils.ALLOW_WORSTCASE_SIZE_EXPRESSION_EVALUATION = oldFlagSizeEval;
+ OptimizerUtils.ALLOW_SPLIT_HOP_DAGS = oldFlagSplit;
}
}
}
\ No newline at end of file