Skip to content

Commit 9ca8124

Browse files
committed
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into develop
yes
2 parents 8cbb49c + 8b1918f commit 9ca8124

File tree

18 files changed

+202
-39
lines changed

18 files changed

+202
-39
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../v2/build_and_install/paddleci.png

doc/fluid/design/motivation/refactorization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ Compile Time -> IR -> Runtime
125125
126126
## Operator/OpWithKernel/OpKernel
127127
128-
![class_diagram](http://api.paddlepaddle.org/graphviz?dot=https://gist.githubusercontent.com/reyoung/53df507f6749762675dff3e7ce53372f/raw/49caf1fb70820fb4a6c217634317c9306f361f36/op_op_with_kern_class_diagram.dot)
128+
![class_diagram](https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/doc/fluid/images/op_op_with_kern_class_diagram.dot)
129129
130130
---
131131
132132
## Operator
133-
![class_diagram](http://api.paddlepaddle.org/graphviz?dot=https://gist.githubusercontent.com/reyoung/53df507f6749762675dff3e7ce53372f/raw/dd598e8f1976f5759f58af5e5ef94738a6b2e661/op.dot)
133+
![class_diagram](https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/doc/fluid/images/op.dot)
134134
135135
* `Operator` is the fundamental building block of the user interface.
136136
* Operator stores input/output variable names and attributes.
@@ -141,7 +141,7 @@ Compile Time -> IR -> Runtime
141141
142142
## OpWithKernel/Kernel
143143
144-
![class_diagram](http://api.paddlepaddle.org/graphviz?dot=https://gist.githubusercontent.com/reyoung/53df507f6749762675dff3e7ce53372f/raw/9d7f4eba185cf41c8e2fbfb40ae21890dbddcd39/op_with_kernel.dot)
144+
![class_diagram](https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/doc/fluid/images/op_with_kernel.dot)
145145
146146
* `OpWithKernel` inherits `Operator`.
147147
* `OpWithKernel` contains a Kernel map.

doc/fluid/images/op.dot

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
digraph sample {
2+
graph [rankdir=TD]; node [shape=record];
3+
op [label="{Operator| InferShape()=0\lRun()=0\l | map<string, string[]> inputs_\lmap<string, string[]> outputs_ \l AttributeMap attrs_\l}"];
4+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
digraph sample {
2+
graph [rankdir=TD]; node [shape=record];
3+
op [label="{Operator| InferShape()=0\lRun()=0\l | map<string, string[]> inputs_\lmap<string, string[]> outputs_ \l AttributeMap attrs_\l}"];
4+
op_with_kern [label="{OpWithKernel | InferShape()=0\lRun()\l | map<OpKernelKey,OpKernel>kernels_ }"]
5+
op_kernel [label="{OpKernel | Compute()=0}"]
6+
op_kernel_key [label="{OpKernelKey| Place place\n...}"]
7+
8+
op -> op_with_kern [dir=back, arrowtail=onormal]
9+
op_with_kern -> op_kernel [arrowhead=vee, label="contains many"]
10+
11+
{
12+
rank=same;
13+
op_with_kern
14+
op_kernel
15+
}
16+
17+
op_kernel -> op_kernel_key [style=invis]
18+
19+
{
20+
rank=same;
21+
op_kernel
22+
op_kernel_key
23+
}
24+
25+
op_with_kern -> op_kernel_key [arrowhead=vee, label ="\nas map key"]
26+
27+
mul_op [label="MulOp"]
28+
op_with_kern -> mul_op [dir=back, arrowtail=onormal]
29+
mul_kernel [label="template <typename Place>\lclass MulOpKernel\l"]
30+
op_kernel -> mul_kernel [dir=back, arrowtail=onormal]
31+
mul_op -> mul_kernel [arrowhead=vee, label="register many"]
32+
33+
{
34+
rank=same;
35+
mul_op;
36+
mul_kernel;
37+
}
38+
}

doc/fluid/images/op_with_kernel.dot

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
digraph sample {
2+
graph [rankdir=TD]; node [shape=record];
3+
op [label="{Operator}"];
4+
op_with_kern [label="{OpWithKernel | InferShape()=0\lRun()\l | map<OpKernelKey,OpKernel>kernels_ }"]
5+
op_kernel [label="{OpKernel | Compute()=0}"]
6+
op_kernel_key [label="{OpKernelKey| Place place\n...}"]
7+
8+
op -> op_with_kern [dir=back, arrowtail=onormal]
9+
op_with_kern -> op_kernel [arrowhead=vee, label="contains many"]
10+
11+
{
12+
rank=same;
13+
op_with_kern
14+
op_kernel
15+
}
16+
17+
op_kernel -> op_kernel_key [style=invis]
18+
19+
{
20+
rank=same;
21+
op_kernel
22+
op_kernel_key
23+
}
24+
25+
op_with_kern -> op_kernel_key [arrowhead=vee, label ="\nas map key"]
26+
}

doc/v2/api/config/layer.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ gated_unit
142142
-----------
143143
.. autoclass:: paddle.v2.layer.gated_unit
144144
:noindex:
145-
145+
146146
Recurrent Layer Group
147147
=====================
148148

@@ -354,7 +354,7 @@ dropout
354354
--------
355355
.. autoclass:: paddle.v2.layer.dropout
356356
:noindex:
357-
357+
358358
dot_prod
359359
---------
360360
.. autoclass:: paddle.v2.layer.dot_prod
@@ -460,6 +460,11 @@ multi_binary_label_cross_entropy_cost
460460
.. autoclass:: paddle.v2.layer.multi_binary_label_cross_entropy_cost
461461
:noindex:
462462

463+
classification_cost
464+
-------------------
465+
.. autoclass:: paddle.v2.layer.classification_cost
466+
:noindex:
467+
463468
huber_regression_cost
464469
-------------------------
465470
.. autoclass:: paddle.v2.layer.huber_regression_cost
@@ -534,7 +539,7 @@ detection_output
534539
----------------
535540
.. autoclass:: paddle.v2.layer.detection_output
536541
:noindex:
537-
542+
538543
Check Layer
539544
============
540545

paddle/fluid/framework/details/fetch_op_handle.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ void FetchOpHandle::RunImpl() {
4949
platform::DeviceContextPool::Instance().Get(platform::CPUPlace());
5050
for (auto *input : inputs_) {
5151
auto *var = static_cast<VarHandle *>(input);
52-
var->generated_op_->Wait(cpu_ctx);
52+
if (var->generated_op_) {
53+
var->generated_op_->Wait(cpu_ctx);
54+
}
5355
}
5456
tensors_.resize(inputs_.size());
5557
auto *var_handle = static_cast<VarHandle *>(inputs_[0]);

paddle/fluid/framework/details/nccl_all_reduce_op_handle.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ void NCCLAllReduceOpHandle::RunImpl() {
3636
// Wait input done
3737
for (auto *in : inputs_) {
3838
auto &p = static_cast<VarHandle *>(in)->place_;
39-
in->generated_op_->Wait(dev_ctxes_[p]);
39+
if (in->generated_op_) {
40+
in->generated_op_->Wait(dev_ctxes_[p]);
41+
}
4042
}
4143

4244
auto &var_name = static_cast<VarHandle *>(this->inputs_[0])->name_;

paddle/fluid/framework/details/send_op_handle.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ void SendOpHandle::RunImpl() {
3232
if (in->DebugString() == "dummy") { // HACK
3333
continue;
3434
}
35-
in->generated_op_->Wait(dev_ctxes_[p]);
35+
if (in->generated_op_) {
36+
in->generated_op_->Wait(dev_ctxes_[p]);
37+
}
3638
}
3739
auto &tmp_scope = local_scope_->FindVar(kLocalExecScopeName)->Get<Scope *>();
3840
// FIXME(wuyi): can not use RunAndRecordEvent here, for it will cause dead

paddle/fluid/inference/tests/book/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ inference_test(label_semantic_roles)
3636
inference_test(recognize_digits ARGS mlp conv)
3737
inference_test(recommender_system)
3838
#inference_test(rnn_encoder_decoder)
39-
inference_test(understand_sentiment ARGS conv)
39+
#inference_test(understand_sentiment ARGS conv)
4040
inference_test(word2vec)

0 commit comments

Comments
 (0)