From cb1891f97bb005651f36284ad3050c12c8753d9f Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Fri, 4 Jan 2019 12:19:32 +0800 Subject: [PATCH] polish test=develop --- python/paddle/fluid/compiler.py | 18 ++++++++++++++++++ python/paddle/fluid/parallel_executor.py | 3 --- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/python/paddle/fluid/compiler.py b/python/paddle/fluid/compiler.py index e5b1ab351e..a4b2ea837f 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 917db02bb8..a0b6392ebc 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 -- GitLab