Skip to content

Commit 687a322

Browse files
committed
Merge remote-tracking branch 'ups/develop' into refine/im2col
2 parents 65d418f + ec4c6e1 commit 687a322

39 files changed

+734
-253
lines changed

doc/fluid/design/ir/draft.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
## Motivation
22

3-
There is a ```gap``` between the ```Program``` defined by
4-
user and the ```Executable``` that can be scheduled
3+
There is a `gap` between the `Program` defined by
4+
user and the `Executable` that can be scheduled
55
efficiently on heterogeneous hardware, either locally
66
or distributedly.
77

8-
Usually, the ```gap``` is bridged by
8+
Usually, the `gap` is bridged by
99

1010
* A serious transformations with defined order.
1111

1212
* These transformations usually involve
13-
```insert, delete, clustering, split, dependency analysis```.
13+
`insert, delete, clustering, split, dependency analysis`.
1414

1515
* Has a simple way to verify and debug each transformation.
1616

@@ -38,44 +38,44 @@ design below.
3838

3939
#### Node
4040

41-
```Node``` represents an operation that performs some computation or
41+
`Node` represents an operation that performs some computation or
4242
a variable that is input or output of operation.
4343

44-
```Node```s are connected to other ```Node```s via inputs and outputs.
44+
`Node`s are connected to other `Node`s via inputs and outputs.
4545

4646
Other properties (maybe device placement information) can be added
47-
to ```Node``` in the future if it's a
48-
common requirement of many other ```Pass```es. Otherwise, it should live
49-
in a ```Node``` wrapper class that is private to some ```Pass``` or be
50-
a local member of a ```Pass```.
47+
to `Node` in the future if it's a
48+
common requirement of many other `Pass`es. Otherwise, it should live
49+
in a `Node` wrapper class that is private to some `Pass` or be
50+
a local member of a `Pass`.
5151

5252
#### Graph
5353

54-
```Graph``` contains a list of ```Node```s, which are connected to
54+
`Graph` contains a list of `Node`s, which are connected to
5555
each other via inputs and outputs.
5656

5757
TODO: Better definitions for the graph.
5858

59-
```Graph``` can also contain ```Attribute```s. ```Attribute```s
60-
can be ``any`` thing. For example, it can be a list of "wraper"
61-
nodes. The ```wrapper``` nodes compose ```Node```s and provide
62-
helper method for execution or transformation. ```Attribute```
59+
`Graph` can also contain `Attribute`s. `Attribute`s
60+
can be `any` thing. For example, it can be a list of "wraper"
61+
nodes. The `wrapper` nodes compose `Node`s and provide
62+
helper method for execution or transformation. `Attribute`
6363
can also contain other things that describe some properties of
64-
the ```Graph``` or ```Graph``` nodes. ```Attribute``` can be passed
65-
across ```Pass```. However, it should be used with care.
64+
the `Graph` or `Graph` nodes. `Attribute` can be passed
65+
across `Pass`. However, it should be used with care.
6666

6767
#### Pass
6868

69-
```Pass``` represents a transformation of ```Graph```. Its input
70-
is a ```Graph``` and its output is also a ```Graph```. For example,
71-
a ```Pass``` can simply print out the ```Graph```. A ```Pass```
72-
can also fuse some ```Graph```'s ```Node```s.
69+
`Pass` represents a transformation of `Graph`. Its input
70+
is a `Graph` and its output is also a `Graph`. For example,
71+
a `Pass` can simply print out the `Graph`. A `Pass`
72+
can also fuse some `Graph`'s `Node`s.
7373

7474
#### Optimize
7575

76-
```Optimize``` contains a series of ```Pass``` with defined order.
77-
```Optimize``` transforms a ```Graph``` that only contains raw
78-
modeling logic to a ```Graph``` that can be run efficiently while
76+
`Optimize` contains a series of `Pass` with defined order.
77+
`Optimize` transforms a `Graph` that only contains raw
78+
modeling logic to a `Graph` that can be run efficiently while
7979
maintaining the original modeling logic.
8080

8181

paddle/fluid/framework/block_desc.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ class BlockDesc {
8888
OpDesc *InsertOp(size_t index);
8989

9090
/*
91-
* Remove Op and its input/output variables.
92-
* Note that for either input or output variable, if it is also an input or
93-
* output variable of other ops, we should remain it.
91+
* Only remove op itself,
92+
* do nothing to its input and output variables
9493
*/
9594
void RemoveOp(size_t s, size_t e);
9695

paddle/fluid/framework/details/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
cc_library(var_handle SRCS var_handle.cc DEPS place framework_proto)
1+
cc_library(var_handle SRCS var_handle.cc DEPS place framework_proto node)
22
cc_library(op_handle_base SRCS op_handle_base.cc DEPS var_handle device_context lod_tensor)
33
cc_library(scale_loss_grad_op_handle SRCS scale_loss_grad_op_handle.cc DEPS op_handle_base scope lod_tensor ddim memory)
44
cc_library(fetch_op_handle SRCS fetch_op_handle.cc DEPS op_handle_base scope lod_tensor ddim memory)
55
cc_library(computation_op_handle SRCS computation_op_handle.cc DEPS framework_proto scope place operator op_registry)
66
cc_library(rpc_op_handle SRCS rpc_op_handle.cc DEPS framework_proto scope place operator op_registry)
77

8-
cc_library(ssa_graph_builder SRCS ssa_graph_builder.cc DEPS graph)
8+
cc_library(ssa_graph_builder SRCS ssa_graph_builder.cc DEPS graph graph_helper)
99
cc_library(ssa_graph_printer SRCS ssa_graph_printer.cc DEPS ssa_graph_builder)
1010
cc_library(ssa_graph_checker SRCS ssa_graph_checker.cc DEPS ssa_graph_builder)
1111

0 commit comments

Comments
 (0)