Package org.apache.sysds.hops.ipa

## Class IPAPassRewriteFederatedPlan

- java.lang.Object
- - org.apache.sysds.hops.ipa.IPAPass
  - - org.apache.sysds.hops.ipa.IPAPassRewriteFederatedPlan

-     public class IPAPassRewriteFederatedPlan
      extends IPAPass

  This rewrite generates a federated execution plan by estimating and setting costs and the FederatedOutput values of all relevant hops in the DML program. The rewrite is only applied if federated compilation is activated in OptimizerUtils.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `IPAPassRewriteFederatedPlan()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `isApplicable​(FunctionCallGraph fgraph)` | Indicates if an IPA pass is applicable for the current configuration.
    `boolean` | `rewriteProgram​(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)` | Estimates cost and selects a federated execution plan by setting the federated output value of each hop in the program.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### IPAPassRewriteFederatedPlan

          public IPAPassRewriteFederatedPlan()

  - ### Method Detail

    - #### isApplicable

          public boolean isApplicable​(FunctionCallGraph fgraph)

      Indicates if an IPA pass is applicable for the current configuration. The configuration depends on OptimizerUtils.FEDERATED_COMPILATION.
      Specified by:
        `isApplicable` in class `IPAPass`
      Parameters:
        `fgraph` - function call graph
      Returns:
        true if federated compilation is activated.

    - #### rewriteProgram

          public boolean rewriteProgram​(DMLProgram prog,
                                        FunctionCallGraph fgraph,
                                        FunctionCallSizeInfo fcallSizes)

      Estimates cost and selects a federated execution plan by setting the federated output value of each hop in the program.
      Specified by:
        `rewriteProgram` in class `IPAPass`
      Parameters:
        `prog` - dml program
        `fgraph` - function call graph
        `fcallSizes` - function call size infos
      Returns:
        false since the function call graph never has to be rebuilt