Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/fluid/build_and_install/paddleci.png
6 changes: 3 additions & 3 deletions doc/fluid/design/motivation/refactorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ Compile Time -> IR -> Runtime

## Operator/OpWithKernel/OpKernel

![class_diagram](http://api.paddlepaddle.org/graphviz?dot=https://gist.githubusercontent.com/reyoung/53df507f6749762675dff3e7ce53372f/raw/49caf1fb70820fb4a6c217634317c9306f361f36/op_op_with_kern_class_diagram.dot)
![class_diagram](https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/doc/fluid/images/op_op_with_kern_class_diagram.dot)

---

## Operator
![class_diagram](http://api.paddlepaddle.org/graphviz?dot=https://gist.githubusercontent.com/reyoung/53df507f6749762675dff3e7ce53372f/raw/dd598e8f1976f5759f58af5e5ef94738a6b2e661/op.dot)
![class_diagram](https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/doc/fluid/images/op.dot)

* `Operator` is the fundamental building block of the user interface.
* Operator stores input/output variable names and attributes.
Expand All @@ -141,7 +141,7 @@ Compile Time -> IR -> Runtime

## OpWithKernel/Kernel

![class_diagram](http://api.paddlepaddle.org/graphviz?dot=https://gist.githubusercontent.com/reyoung/53df507f6749762675dff3e7ce53372f/raw/9d7f4eba185cf41c8e2fbfb40ae21890dbddcd39/op_with_kernel.dot)
![class_diagram](https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/doc/fluid/images/op_with_kernel.dot)

* `OpWithKernel` inherits `Operator`.
* `OpWithKernel` contains a Kernel map.
Expand Down
4 changes: 4 additions & 0 deletions doc/fluid/images/op.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
digraph sample {
graph [rankdir=TD]; node [shape=record];
op [label="{Operator| InferShape()=0\lRun()=0\l | map<string, string[]> inputs_\lmap<string, string[]> outputs_ \l AttributeMap attrs_\l}"];
}
38 changes: 38 additions & 0 deletions doc/fluid/images/op_op_with_kern_class_diagram.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
digraph sample {
graph [rankdir=TD]; node [shape=record];
op [label="{Operator| InferShape()=0\lRun()=0\l | map<string, string[]> inputs_\lmap<string, string[]> outputs_ \l AttributeMap attrs_\l}"];
op_with_kern [label="{OpWithKernel | InferShape()=0\lRun()\l | map<OpKernelKey,OpKernel>kernels_ }"]
op_kernel [label="{OpKernel | Compute()=0}"]
op_kernel_key [label="{OpKernelKey| Place place\n...}"]

op -> op_with_kern [dir=back, arrowtail=onormal]
op_with_kern -> op_kernel [arrowhead=vee, label="contains many"]

{
rank=same;
op_with_kern
op_kernel
}

op_kernel -> op_kernel_key [style=invis]

{
rank=same;
op_kernel
op_kernel_key
}

op_with_kern -> op_kernel_key [arrowhead=vee, label ="\nas map key"]

mul_op [label="MulOp"]
op_with_kern -> mul_op [dir=back, arrowtail=onormal]
mul_kernel [label="template <typename Place>\lclass MulOpKernel\l"]
op_kernel -> mul_kernel [dir=back, arrowtail=onormal]
mul_op -> mul_kernel [arrowhead=vee, label="register many"]

{
rank=same;
mul_op;
mul_kernel;
}
}
26 changes: 26 additions & 0 deletions doc/fluid/images/op_with_kernel.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
digraph sample {
graph [rankdir=TD]; node [shape=record];
op [label="{Operator}"];
op_with_kern [label="{OpWithKernel | InferShape()=0\lRun()\l | map<OpKernelKey,OpKernel>kernels_ }"]
op_kernel [label="{OpKernel | Compute()=0}"]
op_kernel_key [label="{OpKernelKey| Place place\n...}"]

op -> op_with_kern [dir=back, arrowtail=onormal]
op_with_kern -> op_kernel [arrowhead=vee, label="contains many"]

{
rank=same;
op_with_kern
op_kernel
}

op_kernel -> op_kernel_key [style=invis]

{
rank=same;
op_kernel
op_kernel_key
}

op_with_kern -> op_kernel_key [arrowhead=vee, label ="\nas map key"]
}