Package org.apache.sysds.hops.rewrite
Class RewriteInjectSparkLoopCheckpointing
- java.lang.Object
- 
- org.apache.sysds.hops.rewrite.StatementBlockRewriteRule
- 
- org.apache.sysds.hops.rewrite.RewriteInjectSparkLoopCheckpointing
 
 
- 
 public class RewriteInjectSparkLoopCheckpointing extends StatementBlockRewriteRule Rule: Insert checkpointing operations for caching purposes. Currently, we follow a heuristic of checkpointing (1) all variables used read-only in loops, and (2) intermediates used by multiple consumers. TODO (2) implement injection for multiple consumers (local and global).
- 
- 
Constructor SummaryConstructors Constructor Description RewriteInjectSparkLoopCheckpointing(boolean checkParForContext)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancreatesSplitDag()Indicates if the rewrite potentially splits dags, which is used for phase ordering of rewrites.List<StatementBlock>rewriteStatementBlock(StatementBlock sb, ProgramRewriteStatus status)Handle an arbitrary statement block.List<StatementBlock>rewriteStatementBlocks(List<StatementBlock> sbs, ProgramRewriteStatus sate)Handle a list of statement blocks.- 
Methods inherited from class org.apache.sysds.hops.rewrite.StatementBlockRewriteRulecreateCutVarName
 
- 
 
- 
- 
- 
Method Detail- 
createsSplitDagpublic boolean createsSplitDag() Description copied from class:StatementBlockRewriteRuleIndicates if the rewrite potentially splits dags, which is used for phase ordering of rewrites.- Specified by:
- createsSplitDagin class- StatementBlockRewriteRule
- Returns:
- true if dag splits are possible.
 
 - 
rewriteStatementBlockpublic List<StatementBlock> rewriteStatementBlock(StatementBlock sb, ProgramRewriteStatus status) Description copied from class:StatementBlockRewriteRuleHandle an arbitrary statement block. Specific type constraints have to be ensured within the individual rewrites. If a rewrite does not apply to individual blocks, it should simply return the input block.- Specified by:
- rewriteStatementBlockin class- StatementBlockRewriteRule
- Parameters:
- sb- statement block
- status- program rewrite status
- Returns:
- list of statement blocks
 
 - 
rewriteStatementBlockspublic List<StatementBlock> rewriteStatementBlocks(List<StatementBlock> sbs, ProgramRewriteStatus sate) Description copied from class:StatementBlockRewriteRuleHandle a list of statement blocks. Specific type constraints have to be ensured within the individual rewrites. If a rewrite does not require sequence access, it should simply return the input list of statement blocks.- Specified by:
- rewriteStatementBlocksin class- StatementBlockRewriteRule
- Parameters:
- sbs- list of statement blocks
- sate- program rewrite status
- Returns:
- list of statement blocks
 
 
- 
 
-