提交 cb1891f9 编写于 作者: X Xin Pan

polish

test=develop
上级 8ae9094e
...@@ -31,6 +31,24 @@ def _place_obj(place): ...@@ -31,6 +31,24 @@ def _place_obj(place):
class CompiledProgram(object): 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): def __init__(self, program):
self._program = program self._program = program
self._scope = None self._scope = None
......
...@@ -291,6 +291,3 @@ class ParallelExecutor(object): ...@@ -291,6 +291,3 @@ class ParallelExecutor(object):
@property @property
def device_count(self): def device_count(self):
return len(self._places) return len(self._places)
def close(self):
pass
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册