switch(cond, partial(g1, xs), partial(g2, ys))(Zs)
to
switch(cond, g1, g2)(Xs, Ys, Zs)
switch_layer(index, make_tuple(partial(g1, xs), partial(g2, ys)))(Zs)
to
switch_layer(index, make_tuple(g1, g2))(Xs, Ys, Zs)
put Zs at last when unifyparameter as it may have u-monad or io-monad
use joined args other than broadened one as some extra parameter which is not a parameter of while_header can be add to while_body
inline fprop_switch forcely
reorder the parameter if one of the parameter is Monad when incorporate call
incorporate switch tuple_getitem if item 0 of tuple is EnvInstance or
item 1 of tuple is bprop function
addn with shape() and shape(1)
remove context_ from FuncGraphEvaluator to make it re-entry able to resolve evaluator stuck issue because of re-entry of the same FuncGraphEvaluator
1. set class GraphKernel as deprecated, and treat it as Cell
2. set class InplaceAssign as deprecated, suggested using Assign instead.
3. set op_selector as deprecated, removed the _selected_ops and _selected_grad_ops, replaced with real operations
4. removed the two passes of GraphKernel from frontend
5. removed the GraphKernel's codes from other modules
The basic idea is: exploits data dependency to control the execution order
of side-effect operations, and keep the semantics of ANF unchanged.
The ControlDepend primitive is removed and there are two primitives added:
1. UpdateState:
```
a = Assign(para, value)
```
became:
```
a = Assign(para, value, u)
u = UpdateState(u, a)
```
2. Load:
```
x = Add(para, value)
```
became:
```
p = Load(para, u)
x = Add(p, value)
u = UpdateState(u, p)
```
update logic for cache
clean up code
add test cases for new api
update include of code
specify the resolve attr to ClassMember
avoid resolve attr of self