Package org.apache.sysds.hops.rewrite
Class RewriteInjectOOCTee
java.lang.Object
org.apache.sysds.hops.rewrite.StatementBlockRewriteRule
org.apache.sysds.hops.rewrite.RewriteInjectOOCTee
This Rewrite rule injects a Tee Operator for specific Out-Of-Core (OOC) patterns
where a value or an intermediate result is shared twice. Since for OOC we data streams
can only be consumed once.
Pattern identified t(X) %*% X, where the data X will be shared by
t(X) and %*% multiplication.
TeeOp, and safely rewire the graph.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates if the rewrite potentially splits dags, which is used for phase ordering of rewrites.Handle an arbitrary statement block.rewriteStatementBlocks(List<StatementBlock> sbs, ProgramRewriteStatus state) Handle a list of statement blocks.Methods inherited from class org.apache.sysds.hops.rewrite.StatementBlockRewriteRule
createCutVarName
-
Field Details
-
APPLY_ONLY_XtX_PATTERN
public static boolean APPLY_ONLY_XtX_PATTERN
-
-
Constructor Details
-
RewriteInjectOOCTee
public RewriteInjectOOCTee()
-
-
Method Details
-
createsSplitDag
public boolean createsSplitDag()Description copied from class:StatementBlockRewriteRuleIndicates if the rewrite potentially splits dags, which is used for phase ordering of rewrites.- Specified by:
createsSplitDagin classStatementBlockRewriteRule- Returns:
- true if dag splits are possible.
-
rewriteStatementBlock
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 classStatementBlockRewriteRule- Parameters:
sb- statement blockstate- program rewrite status- Returns:
- list of statement blocks
-
rewriteStatementBlocks
public List<StatementBlock> rewriteStatementBlocks(List<StatementBlock> sbs, ProgramRewriteStatus state) 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 classStatementBlockRewriteRule- Parameters:
sbs- list of statement blocksstate- program rewrite status- Returns:
- list of statement blocks
-