# tff.backends.mapreduce.get_broadcast_form_for_computation

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |

Constructs [`tff.backends.mapreduce.BroadcastForm`](https://www.tensorflow.org/federated/api_docs/python/tff/backends/mapreduce/BroadcastForm) given a computation.

    tff.backends.mapreduce.get_broadcast_form_for_computation(
        comp: https://www.tensorflow.org/federated/api_docs/python/tff/framework/ConcreteComputation,
        grappler_config: tf.compat.v1.ConfigProto = _GRAPPLER_DEFAULT_CONFIG,
        *,
        tff_internal_preprocessing: Optional[BuildingBlockFn] = None
    ) -> https://www.tensorflow.org/federated/api_docs/python/tff/backends/mapreduce/BroadcastForm

<br />

<br />

<br />

| ## Args ||
|---|---|
| `comp` | An instance of `computation_impl.ConcreteComputation` that is compatible with broadcast form. Computations are only compatible if they take in a single value placed at server, return a single value placed at clients, and do not contain any aggregations. |
| `grappler_config` | An instance of [`tf.compat.v1.ConfigProto`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/ConfigProto) to configure Grappler graph optimization of the Tensorflow graphs backing the resulting [`tff.backends.mapreduce.BroadcastForm`](https://www.tensorflow.org/federated/api_docs/python/tff/backends/mapreduce/BroadcastForm). These options are combined with a set of defaults that aggressively configure Grappler. If `grappler_config_proto` has `graph_options.rewrite_options.disable_meta_optimizer=True`, Grappler is bypassed. |
| `tff_internal_preprocessing` | An optional function to transform the AST of the computation. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| An instance of [`tff.backends.mapreduce.BroadcastForm`](https://www.tensorflow.org/federated/api_docs/python/tff/backends/mapreduce/BroadcastForm) equivalent to the provided [`tff.Computation`](https://www.tensorflow.org/federated/api_docs/python/tff/Computation). ||

<br />