You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@systemds.apache.org by GitBox <gi...@apache.org> on 2022/07/05 09:24:20 UTC

[GitHub] [systemds] sebwrede commented on a diff in pull request #1649: [SYSTEMDS-3018] Dynamic recompilation of functions with Federated Planner

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: dev-unsubscribe@systemds.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org