提交 a323b263 编写于 作者: X Xin Pan

clarify design

上级 2487951b
...@@ -43,17 +43,26 @@ a variable that is input or output of operation. ...@@ -43,17 +43,26 @@ a variable that is input or output of operation.
```Node```s are connected to other ```Node```s via inputs and outputs. ```Node```s are connected to other ```Node```s via inputs and outputs.
Other properties (maybe device placement information) can be added
to ```Node``` in the future if it's a
common requirement of many other ```Pass```es. Otherwise, it should live
in a ```Node``` wrapper class that is private to some ```Pass``` or be
a local member of a ```Pass```.
#### Graph #### Graph
```Graph``` contains a list of ```Node```s. ```Graph``` contains a list of ```Node```s, which are connected to
each other via inputs and outputs.
TODO: Better definitions for the graph. TODO: Better definitions for the graph.
```Graph``` can also contain ```Attribute```s. ```Attribute```s ```Graph``` can also contain ```Attribute```s. ```Attribute```s
can be ``any`` thing. For example, it can be a list of "wraper" can be ``any`` thing. For example, it can be a list of "wraper"
nodes. The ```wrapper``` nodes compose ```Node```s and provide nodes. The ```wrapper``` nodes compose ```Node```s and provide
helper method for execution. ```Attribute``` can also contain helper method for execution or transformation. ```Attribute```
other things that describe some properties of the ```Graph```. can also contain other things that describe some properties of
the ```Graph``` or ```Graph``` nodes. ```Attribute``` can be passed
across ```Pass```. However, it should be used with care.
#### Pass #### Pass
...@@ -70,12 +79,11 @@ modeling logic to a ```Graph``` that can be run efficiently while ...@@ -70,12 +79,11 @@ modeling logic to a ```Graph``` that can be run efficiently while
maintaining the original modeling logic. maintaining the original modeling logic.
### Workflow ### Optimize Process
* Program is first converted to Graph. * Program is first converted to Graph.
* Graph goes through a series of Pass * Graph goes through a series of Pass
* Graph is transformed from raw model logic to a * Graph is transformed from raw model logic to a
form that is efficient to execute. form that is efficient to execute.
Graph->Pass1->Graph->Pass2->Graph->Pass3->Executor Program->ProgramToGraph->Graph->Pass1->Graph->Pass2->Graph->Pass3->Executor
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册