use of org.apache.sysml.lops.Compression in project incubator-systemml by apache.
the class Hop method constructAndSetCompressionLopIfRequired.
private void constructAndSetCompressionLopIfRequired() {
// determine execution type
ExecType et = ExecType.CP;
if (OptimizerUtils.isSparkExecutionMode() && getDataType() != DataType.SCALAR) {
// persist and unpersist calls (4x the memory budget is conservative)
if (OptimizerUtils.isHybridExecutionMode() && 2 * _outputMemEstimate < OptimizerUtils.getLocalMemBudget() || _etypeForced == ExecType.CP) {
et = ExecType.CP;
} else // default case
{
et = ExecType.SPARK;
}
}
// add reblock lop to output if required
if (_requiresCompression) {
try {
Lop compress = new Compression(getLops(), getDataType(), getValueType(), et);
setOutputDimensions(compress);
setLineNumbers(compress);
setLops(compress);
} catch (LopsException ex) {
throw new HopsException(ex);
}
}
}
use of org.apache.sysml.lops.Compression in project systemml by apache.
the class Hop method constructAndSetCompressionLopIfRequired.
private void constructAndSetCompressionLopIfRequired() {
// determine execution type
ExecType et = ExecType.CP;
if (OptimizerUtils.isSparkExecutionMode() && getDataType() != DataType.SCALAR) {
// persist and unpersist calls (4x the memory budget is conservative)
if (OptimizerUtils.isHybridExecutionMode() && 2 * _outputMemEstimate < OptimizerUtils.getLocalMemBudget() || _etypeForced == ExecType.CP) {
et = ExecType.CP;
} else // default case
{
et = ExecType.SPARK;
}
}
// add reblock lop to output if required
if (_requiresCompression) {
try {
Lop compress = new Compression(getLops(), getDataType(), getValueType(), et);
setOutputDimensions(compress);
setLineNumbers(compress);
setLops(compress);
} catch (LopsException ex) {
throw new HopsException(ex);
}
}
}
Aggregations