Skip to content

Commit a323b26

Browse files
committed
clarify design
1 parent 2487951 commit a323b26

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

doc/fluid/design/ir/draft.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,26 @@ a variable that is input or output of operation.
4343

4444
```Node```s are connected to other ```Node```s via inputs and outputs.
4545

46+
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```.
51+
4652
#### Graph
4753

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

5057
TODO: Better definitions for the graph.
5158

5259
```Graph``` can also contain ```Attribute```s. ```Attribute```s
5360
can be ``any`` thing. For example, it can be a list of "wraper"
5461
nodes. The ```wrapper``` nodes compose ```Node```s and provide
55-
helper method for execution. ```Attribute``` can also contain
56-
other things that describe some properties of the ```Graph```.
62+
helper method for execution or transformation. ```Attribute```
63+
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.
5766

5867
#### Pass
5968

@@ -70,12 +79,11 @@ modeling logic to a ```Graph``` that can be run efficiently while
7079
maintaining the original modeling logic.
7180

7281

73-
### Workflow
74-
82+
### Optimize Process
7583

7684
* Program is first converted to Graph.
7785
* Graph goes through a series of Pass
7886
* Graph is transformed from raw model logic to a
7987
form that is efficient to execute.
8088

81-
Graph->Pass1->Graph->Pass2->Graph->Pass3->Executor
89+
Program->ProgramToGraph->Graph->Pass1->Graph->Pass2->Graph->Pass3->Executor

0 commit comments

Comments
 (0)