sebwrede commented on code in PR #1649:
URL: https://github.com/apache/systemds/pull/1649#discussion_r913582634
##########
src/main/java/org/apache/sysds/hops/fedplanner/FederatedPlannerCostbased.java:
##########
@@ -53,23 +54,29 @@
import org.apache.sysds.parser.WhileStatement;
import org.apache.sysds.parser.WhileStatementBlock;
import org.apache.sysds.runtime.DMLRuntimeException;
+import org.apache.sysds.runtime.controlprogram.LocalVariableMap;
+import org.apache.sysds.runtime.controlprogram.caching.CacheableData;
+import org.apache.sysds.runtime.controlprogram.federated.FederationMap;
+import org.apache.sysds.runtime.instructions.cp.Data;
+import org.apache.sysds.runtime.instructions.cp.IntObject;
import
org.apache.sysds.runtime.instructions.fed.FEDInstruction.FederatedOutput;
import org.apache.sysds.utils.Explain;
import org.apache.sysds.utils.Explain.ExplainType;
public class FederatedPlannerCostbased extends AFederatedPlanner {
private static final Log LOG =
LogFactory.getLog(FederatedPlannerCostbased.class.getName());
- private final static MemoTable hopRelMemo = new MemoTable();
+ private final MemoTable hopRelMemo = new MemoTable();
/**
* IDs of hops for which the final fedout value has been set.
*/
- private final static Set<Long> hopRelUpdatedFinal = new HashSet<>();
+ private final Set<Long> hopRelUpdatedFinal = new HashSet<>();
/**
* Terminal hops in DML program given to this rewriter.
*/
- private final static List<Hop> terminalHops = new ArrayList<>();
- private final static Map<String, Hop> transientWrites = new HashMap<>();
+ private final List<Hop> terminalHops = new ArrayList<>();
+ private final Map<String, Hop> transientWrites = new HashMap<>();
+ private LocalVariableMap localVariableMap = new LocalVariableMap();
Review Comment:
We also have the `Map<String, Hop> paramMap` parameter in the rewrite method
calls. I believe this, your `localVariableMap`, and `transientWrites` can be
combined. It would require some refactoring, so maybe it should be left for a
different PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]