Skip to content

Commit be528f9

Browse files
committed
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into feature/combine_open_files_and_double_buffer
2 parents 72b7815 + 968922b commit be528f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+828
-516
lines changed

benchmark/fluid/fluid_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def train_parallel(avg_loss, infer_prog, optimizer, train_reader, test_reader,
210210
# generate fake:
211211
if args.use_fake_data:
212212
for var in feed_var_list:
213-
v = startup_prog.global_block().clone_variable(var)
213+
v = startup_prog.global_block()._clone_variable(var)
214214
var.persistable = True
215215
v.persistable = True
216216

doc/fluid/design/modules/python_api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ class Block(objects):
9898
def append_operator(self, ...):
9999
self.ops.append(Operator(self, ...))
100100

101-
def prepend_operator(self, ...): # Parameter's ctor prepands initialize operators.
101+
def _prepend_operator(self, ...): # Parameter's ctor prepands initialize operators.
102102
self.ops.prepend(Operator(self, ...))
103103
```
104104

105105
`create_parameter` is necessary because parameters are global variables, defined in the global block, but can be created in some sub-blocks. For example, an FC layer in the step block of an RNN operator.
106106

107-
`prepend_operator` is necessary because the constructor of `Parameter` needs to create the initialize (or load) operator of the parameter, and would like to put it in the *preamble* of the global block.
107+
`_prepend_operator` is necessary because the constructor of `Parameter` needs to create the initialize (or load) operator of the parameter, and would like to put it in the *preamble* of the global block.
108108

109109
### Operator
110110

doc/fluid/howto/performance/error_clip.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def error_clip_callback(block, context):
7878
op_desc = block.desc.op(block.desc.op_size() - 1)
7979
for grad_n in filter(lambda n: grad_to_var.has_key(n),
8080
op_desc.output_arg_names()):
81-
fwd_var = block.var_recursive(grad_to_var[grad_n])
81+
fwd_var = block.__var_recursive(grad_to_var[grad_n])
8282
error_clip = getattr(fwd_var, "error_clip", None)
8383
if not (error_clip is None or isinstance(error_clip,
8484
BaseErrorClipAttr)):

doc/v2/build_and_install/build_from_source_cn.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@ PaddlePaddle需要使用Docker环境完成编译,这样可以免去单独安
3535
# 2. 可选步骤:源码中构建用于编译PaddlePaddle的Docker镜像
3636
docker build -t paddle:dev .
3737
# 3. 执行下面的命令编译CPU-Only的二进制
38-
docker run -it -v $PWD:/paddle -w /paddle -e "WITH_GPU=OFF" -e "WITH_TESTING=OFF" paddlepaddle/paddle_manylinux_devel:cuda8.0_cudnn5 ./paddle/scripts/paddle_build.sh build
38+
docker run -it -v $PWD:/paddle -w /paddle -e "PYTHON_ABI=cp27-cp27mu" -e "WITH_GPU=OFF" -e "WITH_TESTING=OFF" paddlepaddle/paddle_manylinux_devel:cuda8.0_cudnn5 ./paddle/scripts/paddle_build.sh build
3939
# 4. 或者也可以使用为上述可选步骤构建的镜像(必须先执行第2步)
4040
docker run -it -v $PWD:/paddle -w /paddle -e "WITH_GPU=OFF" -e "WITH_TESTING=OFF" paddle:dev ./paddle/scripts/paddle_build.sh build
4141
42-
注:上述命令把当前目录(源码树根目录)映射为 container 里的 :code:`/paddle` 目录。
42+
注:
43+
44+
- 上述命令把当前目录(源码树根目录)映射为 container 里的 :code:`/paddle` 目录。
45+
46+
- 如果您使用的是 manylinux 的镜像进行编译, 那么您需要通过环境变量 :code:`PYTHON_ABI` 来指定一个 `Python ABI <https://www.python.org/dev/peps/pep-0425/#id8>`__.
47+
PaddlePaddle目前支持的 Python ABI 有 :code:`cp27-cp27m` 和 :code:`cp27-cp27mu`.
4348

4449
编译完成后会在build/python/dist目录下生成输出的whl包,可以选在在当前机器安装也可以拷贝到目标机器安装:
4550

doc/v2/build_and_install/build_from_source_en.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,18 @@ If you don't wish to use docker,you need to install several compile dependenci
3636
# 2. Optional: build development docker image from source
3737
docker build -t paddle:dev .
3838
# 3. Run the following command to build a CPU-Only binaries
39-
docker run -it -v $PWD:/paddle -w /paddle -e "WITH_GPU=OFF" -e "WITH_TESTING=OFF" paddlepaddle/paddle_manylinux_devel:cuda8.0_cudnn5 ./paddle/scripts/paddle_build.sh build
39+
docker run -it -v $PWD:/paddle -w /paddle -e "PYTHON_ABI=cp27-cp27mu" -e "WITH_GPU=OFF" -e "WITH_TESTING=OFF" paddlepaddle/paddle_manylinux_devel:cuda8.0_cudnn5 ./paddle/scripts/paddle_build.sh build
4040
# 4. Or, use your built Docker image to build PaddlePaddle (must run step 2)
4141
docker run -it -v $PWD:/paddle -w /paddle -e "WITH_GPU=OFF" -e "WITH_TESTING=OFF" paddle:dev ./paddle/scripts/paddle_build.sh build
4242
43-
NOTE: The above command try to mount the current working directory (root directory of source code)
43+
NOTE:
44+
45+
- The above command try to mount the current working directory (root directory of source code)
4446
into :code:`/paddle` directory inside docker container.
4547

48+
- You need to pass in the required environment variable :code:`PYTHON_ABI` to specify a `Python ABI <https://www.python.org/dev/peps/pep-0425/#id8>`__.
49+
Currently PaddlePaddle supported Python ABIs include :code:`cp27-cp27m` and :code:`cp27-cp27mu` .
50+
4651
When the compile finishes, you can get the output whl package under
4752
build/python/dist, then you can choose to install the whl on local
4853
machine or copy it to the target machine.

paddle/contrib/float16/float16_transpiler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def _remove_unused_var(self):
118118

119119
for var in self.block.vars.keys():
120120
if var not in args:
121-
self.block.remove_var(var)
121+
self.block._remove_var(var)
122122

123123
def _modify_feed_fetch(self):
124124
'''
@@ -165,7 +165,7 @@ def find_op(var):
165165
dtype=core.VarDesc.VarType.FP16,
166166
shape=var.shape,
167167
persistable=var.persistable)
168-
self.block.insert_op(
168+
self.block._insert_op(
169169
i + 1,
170170
type="cast",
171171
inputs={"X": var},
@@ -188,7 +188,7 @@ def find_op(var):
188188
persistable=var.persistable)
189189
find_op(var)
190190
var.op.rename_output(var_name, tmp_var_name)
191-
self.block.insert_op(
191+
self.block._insert_op(
192192
i,
193193
type="cast",
194194
inputs={"X": tmp_var},
@@ -253,4 +253,4 @@ def _should_be_converted(var):
253253

254254
# old var will be replaced by the fp16 var in program desc
255255
self.input_map[var.name] = fp16_var_name
256-
self.block.remove_var(var.name)
256+
self.block._remove_var(var.name)

paddle/contrib/inference/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,3 @@ if (WITH_ANAKIN) # only needed in CI
104104
target_compile_options(inference_anakin_test BEFORE PUBLIC ${ANAKIN_COMPILE_EXTRA_FLAGS})
105105
endif(WITH_TESTING)
106106
endif()
107-
108-
if(WITH_TESTING)
109-
add_subdirectory(demo)
110-
endif()

paddle/contrib/inference/demo/CMakeLists.txt

Lines changed: 0 additions & 59 deletions
This file was deleted.

paddle/contrib/inference/demo/README.md

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
data

0 commit comments

Comments
 (0)