This is an automated email from the ASF dual-hosted git repository.

sebwrede pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git


The following commit(s) were added to refs/heads/main by this push:
     new 29ae7b8e64 [MINOR] Program Rewriter Fix
29ae7b8e64 is described below

commit 29ae7b8e641546161681f18c40865b8d76b55166
Author: sebwrede <[email protected]>
AuthorDate: Wed Apr 20 16:05:47 2022 +0200

    [MINOR] Program Rewriter Fix
    
    Closes #1591.
---
 src/main/java/org/apache/sysds/hops/rewrite/ProgramRewriter.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sysds/hops/rewrite/ProgramRewriter.java 
b/src/main/java/org/apache/sysds/hops/rewrite/ProgramRewriter.java
index 060605ad71..faec3504e9 100644
--- a/src/main/java/org/apache/sysds/hops/rewrite/ProgramRewriter.java
+++ b/src/main/java/org/apache/sysds/hops/rewrite/ProgramRewriter.java
@@ -27,8 +27,10 @@ import org.apache.log4j.Logger;
 import org.apache.sysds.api.DMLScript;
 import org.apache.sysds.conf.ConfigurationManager;
 import org.apache.sysds.conf.CompilerConfig.ConfigType;
+import org.apache.sysds.conf.DMLConfig;
 import org.apache.sysds.hops.Hop;
 import org.apache.sysds.hops.OptimizerUtils;
+import org.apache.sysds.hops.fedplanner.FTypes;
 import org.apache.sysds.parser.DMLProgram;
 import org.apache.sysds.parser.ForStatement;
 import org.apache.sysds.parser.ForStatementBlock;
@@ -139,7 +141,9 @@ public class ProgramRewriter
                                _dagRuleSet.add( new 
RewriteAlgebraicSimplificationDynamic()      ); //dependencies: cse
                                _dagRuleSet.add( new 
RewriteAlgebraicSimplificationStatic()       ); //dependencies: cse
                        }
-                       if ( OptimizerUtils.FEDERATED_COMPILATION ) {
+                       String planner = ConfigurationManager.getDMLConfig()
+                               .getTextValue(DMLConfig.FEDERATED_PLANNER);
+                       if ( OptimizerUtils.FEDERATED_COMPILATION || 
FTypes.FederatedPlanner.isCompiled(planner) ) {
                                _dagRuleSet.add( new 
RewriteFederatedExecution() );
                        }
                }

Reply via email to