@@ -43,17 +43,26 @@ a variable that is input or output of operation.
43
43
44
44
``` Node ``` s are connected to other ``` Node ``` s via inputs and outputs.
45
45
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
+
46
52
#### Graph
47
53
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.
49
56
50
57
TODO: Better definitions for the graph.
51
58
52
59
``` Graph ``` can also contain ``` Attribute ``` s. ``` Attribute ``` s
53
60
can be `` any `` thing. For example, it can be a list of "wraper"
54
61
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.
57
66
58
67
#### Pass
59
68
@@ -70,12 +79,11 @@ modeling logic to a ```Graph``` that can be run efficiently while
70
79
maintaining the original modeling logic.
71
80
72
81
73
- ### Workflow
74
-
82
+ ### Optimize Process
75
83
76
84
* Program is first converted to Graph.
77
85
* Graph goes through a series of Pass
78
86
* Graph is transformed from raw model logic to a
79
87
form that is efficient to execute.
80
88
81
- Graph->Pass1->Graph->Pass2->Graph->Pass3->Executor
89
+ Program->ProgramToGraph-> Graph->Pass1->Graph->Pass2->Graph->Pass3->Executor
0 commit comments