Package org.apache.sysds.hops.fedplanner
Class FederatedPlannerCostbased
- java.lang.Object
-
- org.apache.sysds.hops.fedplanner.AFederatedPlanner
-
- org.apache.sysds.hops.fedplanner.FederatedPlannerCostbased
-
public class FederatedPlannerCostbased extends AFederatedPlanner
-
-
Constructor Summary
Constructors Constructor Description FederatedPlannerCostbased()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildCombinations(List<List<FTypes.FType>> validFTypes, List<List<FTypes.FType>> result, int currentIndex, List<FTypes.FType> currentResult)List<List<FTypes.FType>>getAllCombinations(List<List<FTypes.FType>> validFTypes)List<Hop>getTerminalHops()voidrewriteFunctionDynamic(FunctionStatementBlock function, LocalVariableMap funcArgs)Selects a federated execution plan for the given function, taking into account federation types of the arguments.voidrewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)Selects a federated execution plan for the given program by setting the forced execution type.ArrayList<StatementBlock>rewriteStatementBlock(DMLProgram prog, StatementBlock sb, Map<String,Hop> paramMap)Estimates cost and enumerates federated execution plans in hopRelMemo.voidsetFinalFedouts()Set final fedouts of all hops starting from terminal hops.voidupdateExplain()Add hopRelMemo to Explain class to get explain info related to federated enumeration.
-
-
-
Method Detail
-
rewriteProgram
public void rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)
Description copied from class:AFederatedPlannerSelects a federated execution plan for the given program by setting the forced execution type.- Specified by:
rewriteProgramin classAFederatedPlanner- Parameters:
prog- dml programfgraph- function call graphfcallSizes- function call graph sizes
-
rewriteFunctionDynamic
public void rewriteFunctionDynamic(FunctionStatementBlock function, LocalVariableMap funcArgs)
Description copied from class:AFederatedPlannerSelects a federated execution plan for the given function, taking into account federation types of the arguments.- Specified by:
rewriteFunctionDynamicin classAFederatedPlanner- Parameters:
function- The function statement block to recompile.funcArgs- The function arguments.
-
rewriteStatementBlock
public ArrayList<StatementBlock> rewriteStatementBlock(DMLProgram prog, StatementBlock sb, Map<String,Hop> paramMap)
Estimates cost and enumerates federated execution plans in hopRelMemo. The method calls the contained statement blocks recursively.- Parameters:
prog- dml programsb- statement blockparamMap- map of parameters in function call- Returns:
- list of statement blocks with the federated output value updated for each hop
-
setFinalFedouts
public void setFinalFedouts()
Set final fedouts of all hops starting from terminal hops.
-
getAllCombinations
public List<List<FTypes.FType>> getAllCombinations(List<List<FTypes.FType>> validFTypes)
-
buildCombinations
public void buildCombinations(List<List<FTypes.FType>> validFTypes, List<List<FTypes.FType>> result, int currentIndex, List<FTypes.FType> currentResult)
-
updateExplain
public void updateExplain()
Add hopRelMemo to Explain class to get explain info related to federated enumeration.
-
-