You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by de...@apache.org on 2017/07/13 01:30:47 UTC
systemml git commit: [SYSTEMML-1763] Fix Explain
countCompiledInstructions for CP
Repository: systemml
Updated Branches:
refs/heads/master a430481ba -> 0226899e3
[SYSTEMML-1763] Fix Explain countCompiledInstructions for CP
Increment the ExplainCounts numCPInst value in countCompiledInstructions
based on the value of the CP parameter.
Change countCompiledInstructions method return type to void.
Closes #569.
Project: http://git-wip-us.apache.org/repos/asf/systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/0226899e
Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/0226899e
Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/0226899e
Branch: refs/heads/master
Commit: 0226899e32073a1f074fffce8e6b05e4615742c9
Parents: a430481
Author: Deron Eriksson <de...@apache.org>
Authored: Wed Jul 12 18:28:15 2017 -0700
Committer: Deron Eriksson <de...@apache.org>
Committed: Wed Jul 12 18:28:15 2017 -0700
----------------------------------------------------------------------
.../java/org/apache/sysml/utils/Explain.java | 25 +++++++++++++++-----
1 file changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/systemml/blob/0226899e/src/main/java/org/apache/sysml/utils/Explain.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/utils/Explain.java b/src/main/java/org/apache/sysml/utils/Explain.java
index 59e0b86..a2e843a 100644
--- a/src/main/java/org/apache/sysml/utils/Explain.java
+++ b/src/main/java/org/apache/sysml/utils/Explain.java
@@ -989,15 +989,30 @@ public class Explain
}
}
- private static int countCompiledInstructions( ArrayList<Instruction> instSet, ExplainCounts counts, boolean MR, boolean CP, boolean SP )
+ /**
+ * Count the number of Hadoop instructions, CP instructions, Spark
+ * instructions, and/or Spark reblock instructions in a list of
+ * instructions.
+ *
+ * @param instSet
+ * list of instructions
+ * @param counts
+ * explain counts
+ * @param MR
+ * if true, count Hadoop instructions
+ * @param CP
+ * if true, count CP instructions
+ * @param SP
+ * if true, count Spark instructions and Spark reblock
+ * instructions
+ */
+ private static void countCompiledInstructions( ArrayList<Instruction> instSet, ExplainCounts counts, boolean MR, boolean CP, boolean SP )
{
- int ret = 0;
-
for( Instruction inst : instSet )
{
if( MR && inst instanceof MRJobInstruction )
counts.numJobs++;
- else if( SP && inst instanceof CPInstruction )
+ else if( CP && inst instanceof CPInstruction )
counts.numCPInst++;
else if( SP && inst instanceof SPInstruction )
counts.numJobs++;
@@ -1006,8 +1021,6 @@ public class Explain
if( SP && (inst instanceof CSVReblockSPInstruction || inst instanceof ReblockSPInstruction) )
counts.numReblocks++;
}
-
- return ret;
}
private static String explainFunctionCallGraph(FunctionCallGraph fgraph, HashSet<String> fstack, String fkey, int level)