Package org.apache.sysds.hops.rewrite
Class RewriteCompressedReblock
- java.lang.Object
-
- org.apache.sysds.hops.rewrite.StatementBlockRewriteRule
-
- org.apache.sysds.hops.rewrite.RewriteCompressedReblock
-
public class RewriteCompressedReblock extends StatementBlockRewriteRule
Rule: Compressed Re block if config compressed.linalg is enabled, we inject compression directions after read of matrices if number of rows is above 1000 and cols at least 1. In case of 'auto' compression, we apply compression if the data size is known to exceed aggregate cluster memory, the matrix is used in loops, and all operations are supported over compressed matrices.
-
-
Constructor Summary
Constructors Constructor Description RewriteCompressedReblock()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
createsSplitDag()
Indicates if the rewrite potentially splits dags, which is used for phase ordering of rewrites.List<StatementBlock>
rewriteStatementBlock(StatementBlock sb, ProgramRewriteStatus sate)
Handle an arbitrary statement block.List<StatementBlock>
rewriteStatementBlocks(List<StatementBlock> sbs, ProgramRewriteStatus sate)
Handle a list of statement blocks.static boolean
satisfiesAggressiveCompressionCondition(Hop hop)
static boolean
satisfiesCompressionCondition(Hop hop)
static boolean
satisfiesSizeConstraintsForCompression(Hop hop)
-
Methods inherited from class org.apache.sysds.hops.rewrite.StatementBlockRewriteRule
createCutVarName
-
-
-
-
Method Detail
-
createsSplitDag
public boolean createsSplitDag()
Description copied from class:StatementBlockRewriteRule
Indicates if the rewrite potentially splits dags, which is used for phase ordering of rewrites.- Specified by:
createsSplitDag
in classStatementBlockRewriteRule
- Returns:
- true if dag splits are possible.
-
rewriteStatementBlock
public List<StatementBlock> rewriteStatementBlock(StatementBlock sb, ProgramRewriteStatus sate)
Description copied from class:StatementBlockRewriteRule
Handle 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:
rewriteStatementBlock
in classStatementBlockRewriteRule
- Parameters:
sb
- statement blocksate
- program rewrite status- Returns:
- list of statement blocks
-
rewriteStatementBlocks
public List<StatementBlock> rewriteStatementBlocks(List<StatementBlock> sbs, ProgramRewriteStatus sate)
Description copied from class:StatementBlockRewriteRule
Handle 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:
rewriteStatementBlocks
in classStatementBlockRewriteRule
- Parameters:
sbs
- list of statement blockssate
- program rewrite status- Returns:
- list of statement blocks
-
satisfiesSizeConstraintsForCompression
public static boolean satisfiesSizeConstraintsForCompression(Hop hop)
-
satisfiesCompressionCondition
public static boolean satisfiesCompressionCondition(Hop hop)
-
satisfiesAggressiveCompressionCondition
public static boolean satisfiesAggressiveCompressionCondition(Hop hop)
-
-