Attend the Women in ML Symposium on December 7 Register now


Parses TFF construct comp into TensorFlow construct.

Does not change the type signature of comp. Therefore may return either a building_blocks.CompiledComputation or a building_blocks.Call with no argument and function building_blocks.CompiledComputation.

comp Instance of building_blocks.ComputationBuildingBlock to parse down to a single TF block.
grappler_config_proto An instance of tf.compat.v1.ConfigProto to configure Grappler graph optimization of the generated TensorFlow graph. If grappler_config_proto has graph_options.rewrite_options.disable_meta_optimizer=True, Grappler is bypassed.

The result of parsing TFF to TF. If successful, this is either a single building_blocks.CompiledComputation, or a call to one. If unsuccessful, there may be more TFF constructs still remaining. Notice it is not the job of this function, but rather its callers, to check that the result of this parse is as expected.