Class OptimizationWrapper
java.lang.Object
org.apache.sysds.runtime.controlprogram.parfor.opt.OptimizationWrapper
Wrapper to ParFOR cost estimation and optimizer. This is intended to be the
only public access to the optimizer package.
NOTE: There are two main alternatives for invocation of this OptimizationWrapper:
(1) During compilation (after creating rtprog), (2) on execute of all top-level ParFOR PBs.
We decided to use (2) (and carry the SBs during execution) due to the following advantages
- Known Statistics: problem size of top-level parfor known, in general, less unknown statistics
- No Overhead: preventing overhead for non-parfor scripts (finding top-level parfors)
- Simplicity: no need of finding top-level parfors
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidoptimize(ParForProgramBlock.POptMode type, ParForStatementBlock sb, ParForProgramBlock pb, ExecutionContext ec, int numRuns) Called once per top-level parfor (during runtime, on parfor execute) in order to optimize the specific parfor program block.
-
Field Details
-
PAR_FACTOR_INFRASTRUCTURE
public static final double PAR_FACTOR_INFRASTRUCTURE- See Also:
-
-
Constructor Details
-
OptimizationWrapper
public OptimizationWrapper()
-
-
Method Details
-
optimize
public static void optimize(ParForProgramBlock.POptMode type, ParForStatementBlock sb, ParForProgramBlock pb, ExecutionContext ec, int numRuns) Called once per top-level parfor (during runtime, on parfor execute) in order to optimize the specific parfor program block. NOTE: this is the default way to invoke parfor optimizers.- Parameters:
type- ?sb- parfor statement blockpb- parfor program blockec- execution contextnumRuns- number of optimizations performed so far
-