Add a compiler function to the `ExecutionContext` object.
This change adds a compiler function to the `ExecutionContext` object. Conceptually a `Context` can be thought of as an "environment" which owns compilation and owns execution for a given computation. Additionally, this change replaces `set_default_executor` with higher level functions in order to simplify how contexts are constructed. * Added compiler function to the `ExecutionContext`. * Deprecated `set_default_executor`. * Removed all usage of `set_default_executor` internally. * Added convenience high level functions that set an execution context: * tff.backends.native.set_local_execution_context * Updated `set_default_executor` call-sites to either use the convenience high level functions or to manually construct a context and use `set_default_context`. Note that we should consider creating the following convenience high level functions: * tff.backends.native.set_remote_execution_context * tff.backends.native.set_sizing_execution_context * tff.backends.iree.set_iree_execution_context PiperOrigin-RevId: 321263709
Showing
- docs/tutorials/custom_federated_algorithms_2.ipynb 1 addition, 1 deletiondocs/tutorials/custom_federated_algorithms_2.ipynb
- docs/tutorials/high_performance_simulation_with_kubernetes.ipynb 3 additions, 1 deletion...torials/high_performance_simulation_with_kubernetes.ipynb
- tensorflow_federated/python/core/__init__.py 1 addition, 1 deletiontensorflow_federated/python/core/__init__.py
- tensorflow_federated/python/core/api/BUILD 2 additions, 0 deletionstensorflow_federated/python/core/api/BUILD
- tensorflow_federated/python/core/api/computations_test.py 5 additions, 2 deletionstensorflow_federated/python/core/api/computations_test.py
- tensorflow_federated/python/core/api/intrinsics_test.py 1 addition, 1 deletiontensorflow_federated/python/core/api/intrinsics_test.py
- tensorflow_federated/python/core/backends/BUILD 4 additions, 1 deletiontensorflow_federated/python/core/backends/BUILD
- tensorflow_federated/python/core/backends/__init__.py 1 addition, 0 deletionstensorflow_federated/python/core/backends/__init__.py
- tensorflow_federated/python/core/backends/iree/BUILD 2 additions, 1 deletiontensorflow_federated/python/core/backends/iree/BUILD
- tensorflow_federated/python/core/backends/iree/executor_test.py 6 additions, 4 deletions...flow_federated/python/core/backends/iree/executor_test.py
- tensorflow_federated/python/core/backends/mapreduce/BUILD 1 addition, 1 deletiontensorflow_federated/python/core/backends/mapreduce/BUILD
- tensorflow_federated/python/core/backends/mapreduce/canonical_form_utils_test.py 2 additions, 2 deletions...thon/core/backends/mapreduce/canonical_form_utils_test.py
- tensorflow_federated/python/core/backends/mapreduce/transformations_test.py 1 addition, 1 deletion...ed/python/core/backends/mapreduce/transformations_test.py
- tensorflow_federated/python/core/backends/native/BUILD 25 additions, 0 deletionstensorflow_federated/python/core/backends/native/BUILD
- tensorflow_federated/python/core/backends/native/__init__.py 16 additions, 0 deletionstensorflow_federated/python/core/backends/native/__init__.py
- tensorflow_federated/python/core/backends/native/execution_contexts.py 34 additions, 0 deletions...derated/python/core/backends/native/execution_contexts.py
- tensorflow_federated/python/core/framework/BUILD 1 addition, 0 deletionstensorflow_federated/python/core/framework/BUILD
- tensorflow_federated/python/core/framework/__init__.py 1 addition, 0 deletionstensorflow_federated/python/core/framework/__init__.py
- tensorflow_federated/python/core/impl/compiler/compiler_pipeline.py 4 additions, 5 deletions..._federated/python/core/impl/compiler/compiler_pipeline.py
- tensorflow_federated/python/core/impl/computation_serialization_test.py 1 addition, 1 deletion...erated/python/core/impl/computation_serialization_test.py
Loading
Please register or sign in to comment