Commit Graph

49 Commits

Author SHA1 Message Date
zhousiyi a5b4e7bbf8 lift fv before grad except weight, then convert
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
2021-07-03 00:03:37 +08:00
l00591931 0424b2d8d6 Fix warning in master 2021-06-04 17:40:01 +08:00
lvliang 116781041a fix ut compile failed 2021-05-19 19:59:10 +08:00
zhousiyi 4ff19b7082 add API to build bprop funcgraph which can be used for higher grad 2021-05-19 19:59:06 +08:00
lvliang c759effa94 fix_compile_ut_failed 2021-05-19 19:59:06 +08:00
zhousiyi 1843740e0d 1. set abstract for node. 2. Adjust the position of sens parameter from last to position just after Inputs. 3. Set debug name for Parameter 2021-05-19 19:58:51 +08:00
zhousiyi b40816e66a add support for stop_gradient primitive. And defer BackPropagation to End API 2021-05-19 19:58:49 +08:00
zhousiyi 0d6a5ccfe4 grad op for pynative 2021-05-19 19:58:46 +08:00
huangbingjian 134d5dfe4b separate irpass EnvGetItemEliminater and ItemTupleOrListEliminator 2021-04-02 17:38:40 +08:00
chenfei fc335daa30 get all j node and then expand them 2021-03-12 20:06:43 +08:00
yujianfeng f0b7c3dd4d Add a switch to control grad for scalar 2021-02-27 18:12:37 +08:00
yujianfeng 41189781f3 support scalar input for cell 2021-02-25 09:56:15 +08:00
buxue 6ccc4379b4 do not broaden scalar 2021-02-03 11:30:25 +08:00
zhouyuanshen d1e6878011 remove dot 2021-02-01 09:39:27 +08:00
buxue 2530943a7f optimize list getitem in bprop 2020-12-15 15:00:49 +08:00
yujianfeng 3176d377e6 Remove redundant phi nodes 2020-11-16 09:36:55 +08:00
Yi Huaijie d7faa77b5e support int64 shape 2020-11-05 21:15:49 +08:00
Hoai Linh Tran 46f07efc31 Fix AdjustAllReduceMulAdd pass
Revive tests in lib_test

Code cleaning
2020-09-19 01:07:01 -04:00
fary86 fcbb3e0edc Refactor ms_context implementation 2020-08-30 22:51:40 +08:00
zhousiyi c25e37e7bf make backend/optimizer pybind free 2020-08-28 08:56:58 +00:00
panyifeng 34e50e5d6e fix cell bprop 2020-08-07 10:57:01 +08:00
kingfo 28dabf0332 fix grad flag update issue in pynative 2020-08-06 15:12:31 +08:00
liubuyu a499d4e47c decoupling core and debug 2020-07-31 10:39:31 +08:00
liubuyu f4bc0bc9fe move the dependency of utils to core 2020-07-27 10:28:46 +08:00
He Wei 60d168adec Decouple ir from optimizer 2020-07-21 14:48:26 +08:00
mindspore-ci-bot db80643ee2 !3177 Update Arithmetic Simplify to use Pattern Matcher (2)
Merge pull request !3177 from Giancarlo/pm_arithmetic_simplify
2020-07-20 10:02:06 +08:00
Giancarlo Colmenares cfbfaddfe1 Updated arithmetic simplify to use Pattern Matcher 2020-07-17 10:05:09 -04:00
panyifeng 5a10383cc3 add coo_tensor 2020-07-17 18:53:03 +08:00
liubuyu 43c79eb853 mindspore path adjust 2020-07-14 18:07:28 +08:00
BowenK af36bd7698 Revert PR 2923 2020-07-14 10:01:08 +08:00
Giancarlo Colmenares 7f759c2a4c Updated arithmetic simplify to use Pattern Matcher 2020-07-08 16:01:04 -04:00
panyifeng d6635bbbe2 Add IndexedSlices 2020-06-30 17:38:24 +08:00
Giancarlo Colmenares aabec55c79 Removing TransformFuncType 2020-06-24 13:48:57 -04:00
zhousiyi b2ec296f99 add opt pass for tuple_getitem with constant input 2020-06-23 07:41:21 +00:00
gong chen a6dfa281ea Init GraphKernel.
- It provides a unified style to express graph and kernel for user.
- It provides a unified IR to represent graph and kernel for developer.
- It breaks the boundary between graph and kernel.
- It provides more opportunities to do compile optimization.
2020-06-20 22:31:54 +08:00
BowenK 8f29e7242f add pass to eliminate depend value 2020-06-19 14:52:52 +08:00
Kang 2974b906d3 Optimization for opt 2020-06-17 16:04:54 +08:00
mindspore-ci-bot 9e1dea1ff9 !1928 delete redundant reshape op
Merge pull request !1928 from yoonlee666/deletereshape
2020-06-10 20:11:22 +08:00
yoonlee666 881af56ec3 optimize redundant reshape op 2020-06-10 18:21:00 +08:00
zhaoting b16a552d41 Revert "Revert "add pattern AdjustAllReduceMulAdduse the old opadd test case for bugtemp fix try""
This reverts commit 705c71a257.
2020-06-09 20:56:36 +08:00
huangdongrun beacc26077 * add isconstant primitive
* add infer_value for common math ops
* convert constant bool tensor to bool value

* do not infer value when encounter 0 as division

for while condition, do not unrool if condition is a tensor
2020-06-04 21:51:44 +08:00
gengdongjie 705c71a257 Revert "add pattern AdjustAllReduceMulAdduse the old opadd test case for bugtemp fix try"
This reverts commit 3db8cfa54f.
2020-05-28 15:21:15 +08:00
Zhang Qinghua f31564ce98 Remove the useless collectors in manager. 2020-05-25 09:56:28 +08:00
Wei Luning 3db8cfa54f add pattern AdjustAllReduceMulAdduse the old opadd test case for bugtemp fix try 2020-05-19 18:46:11 +08:00
Wei Luning f305d6f8a7 Revert "add pattern AdjustAllReduceMulAdd"
This reverts commit ea6958c50a.
2020-04-25 19:50:50 +08:00
zhousiyi f6a4f3d155 [static_analysis]: remove the TrivialPrimEvaluator cache.
add cache for PythonPrimEvaluator. Be careful that
 the infer function of PythonPrimitive in python code should
 be idempotent.
2020-04-23 09:13:57 +00:00
Wei Luning ea6958c50a add pattern AdjustAllReduceMulAdd 2020-04-18 17:00:55 +08:00
biffex 62bbf560c6 constant duplicate mul for momentum 2020-04-09 22:28:00 +08:00
zhunaipan 930a1fb0a8 initial version
Signed-off-by: leonwanghui <leon.wanghui@huawei.com>
2020-03-27 22:54:54 +08:00