diff --git a/python/paddle/fluid/compiler.py b/python/paddle/fluid/compiler.py index e5b1ab351e91434e1e16e99f15f2553631eff5a7..a4b2ea837fe26eb4b87f49608091497c7e8a8c40 100644 --- a/python/paddle/fluid/compiler.py +++ b/python/paddle/fluid/compiler.py @@ -31,6 +31,24 @@ def _place_obj(place): class CompiledProgram(object): + """ + Compiles a Program for execution. + + The CompiledProgram is used to transform a program for various + optimizations, for example. + * Pre-compute some logic once so that each run is faster. + * Transform the program so that it can run in multiple devices. + * TODO: transform the program for optimized inference or distributed + training. + + Example: + + + Args: + program: Program instance that contains the model logic. + + """ + def __init__(self, program): self._program = program self._scope = None diff --git a/python/paddle/fluid/parallel_executor.py b/python/paddle/fluid/parallel_executor.py index 917db02bb852df5c540279e5a5bbeaa7b701b09d..a0b6392ebc95251baa257458ab85dbd147cea49c 100644 --- a/python/paddle/fluid/parallel_executor.py +++ b/python/paddle/fluid/parallel_executor.py @@ -291,6 +291,3 @@ class ParallelExecutor(object): @property def device_count(self): return len(self._places) - - def close(self): - pass