Commit Graph

143 Commits

Author SHA1 Message Date
i-robot aef419ff0a !27201 Adapt Graphkernel For CPU CI
Merge pull request !27201 from ZengZitao/adapt_cpu_ci
2021-12-10 08:41:50 +00:00
i-robot ed63220a9f !27357 Fix Type Error of Aot Test File on Mac and Add Comments
Merge pull request !27357 from jiaoy1224/arithmetic
2021-12-10 06:21:16 +00:00
zengzitao 6f4aebbe11 adapt ms_cpu ci for graphkernel 2021-12-09 19:44:09 +08:00
Yang Jiao d9531a4f73 add head for aot test 2021-12-08 17:05:13 +08:00
looop5 ae5532fb9e pass lambda function to out_shape and out_dtype 2021-12-06 10:21:16 +08:00
Yang Jiao 5acce31c72 apply autodiff in custom 2021-12-03 11:16:19 +08:00
looop5 9c4fe8b6bf update akg, refine document of Custom op 2021-11-16 11:06:40 +08:00
looop5 58e27d87bc add Custom, custom_op_info_register, CustomRegOp to __init__ 2021-11-11 20:49:16 +08:00
Yang Jiao 2b112ef656 add custom pynative test cases 2021-11-08 17:37:39 +08:00
looop5 b89d744e80 Custom op supports no reg info 2021-11-05 17:21:39 +08:00
Yang Jiao 9bcf28d15d adapt custom op to pyfunc kernel 2021-10-31 22:08:10 +08:00
looop5 0b34bf33bc add custom op pynative testcases 2021-10-25 20:53:42 +08:00
Yang Jiao 40b648b873 add aot 2021-10-22 11:37:39 +08:00
looop5 46789f260a Custom operator supports tbe dsl 2021-10-15 16:28:33 +08:00
huanghui ba66c0d491 add security isolate for save_graphs 2021-09-14 10:24:12 +08:00
yanghaoran a0ff742442 prune less effective Ascend testcases to level1 2021-08-27 19:59:59 +08:00
Zichun Ye a7d89f6686 add graph kernel userdefine op support
fix code check
2021-08-25 14:37:28 +08:00
dayschan 9add26ad99 Add expanders in c++ code
transplant the op expander code from python to c++, base on LiteGraph.
the c++ expander will be called in priority if it was registered in OpExpanderFactory.

add two examples, BiasAdd and ExpandDims.
remove BiasAdd from python expanders.
since the ExpandDims is also imported by other ops (e.g. BatchNorm), we don't remove it now.
2021-08-12 16:22:56 +08:00
chenlei_autodiff 0271535429 [GraphKernel] fix bert and add graph kernel ops. 2021-08-10 16:02:00 +08:00
i-robot 9629b4ebd9 !21071 [Graph Kernel] Add Low Precision Optimition
Merge pull request !21071 from cyun/master_729
2021-08-05 00:50:58 +00:00
cy 4105a247b7 add low precison 2021-08-04 09:52:42 +08:00
Yang Jiao fd7ab25fc2 reorganiz empty graph 2021-07-30 15:37:47 +08:00
Zichun Ye 22172f18bc update graph kernel support for argmax/argmin
fix pylint problem

fix conflict

fix op list

fix check warning

fix code based on review comments

update akg commit

fix check warning
2021-07-30 09:53:12 +08:00
Yang Jiao e2cfc516eb refctor arithmetic simplify 2021-07-27 11:29:26 +08:00
lingyunli63 50a66ae476 isnan isfinite isinf squaresumall identity oneslik 2021-07-26 12:58:30 +08:00
i-robot 26027b89fe !19806 add graph kernel erf, erfc, floor, floordiv, mod, floormod, div
Merge pull request !19806 from 杨林枫/basic_graph_kernels
2021-07-22 12:57:55 +00:00
yanglf1121 c30b1e6d06 add graph kernel div, floordiv, mod, floormod, floor 2021-07-22 14:16:56 +08:00
i-robot 7d2a07a2bd !20480 Add LiteGraph for graphkernel
Merge pull request !20480 from DeshiChen/0618_litegraph
2021-07-22 01:31:45 +00:00
dayschan 137608b518 Add LiteGraph for graphkernel
Add a subdirectory "model" in the "backend/optimizer/graph_kernel" for litegraph.
Implement two interfaces "AnfGraph2LiteGraph" and "LiteGraph2AnfGraph".

The litegraph will be the base data structure when we migrate the GraphKernel code
from python("mindspore/_extends/graph_kernel") to c++.
2021-07-21 10:21:11 +08:00
wangrao124 7cddde47b0 !215 add ops: LogicalNot, LogicalAnd, LogicalOr, NotEqual, EqualCount, Asinh, Acosh
* add ops: LogicalNot, LogicalAnd, LogicalOr, NotEqual, EqualCount, Asinh, Acosh
2021-07-21 10:01:17 +08:00
chenlei_autodiff 7d55cef106 [GraphKernel] add sponge ops. 2021-07-19 19:34:23 +08:00
dayschan 149dab39c5 Add expander for AddN; update akg submodule 2021-06-29 11:43:46 +08:00
lingyunli63 a995bea507 recompute_fuse 2021-06-22 20:39:11 +08:00
zengzitao 8064de7931 fix maximum_grad and minimum_grad input_shape not equal to output_shape bug 2021-06-16 14:25:18 +08:00
i-robot 07f58b0b46 !17626 matmul to mul
Merge pull request !17626 from lingyunli63/matmul_to_mul
2021-06-10 11:35:18 +08:00
looop5 a5cb14261d recover several graph kernel ci testcases 2021-06-09 20:32:02 +08:00
lingyunli63 4f34e537a0 replace matmul/batchmatmul by mul when k is 1 2021-06-09 15:00:27 +08:00
wenfangpei fd84c20a6a bug fix in lamb 2021-05-29 16:02:30 +08:00
mindspore-ci-bot f91a365564 !16322 [GraphKernel] Enable matmul for gpu
From: @lingyunli63
Reviewed-by: 
Signed-off-by:
2021-05-20 10:08:47 +08:00
lingyunli63 afc69b16f7 enable gpu gk MatMul and insert pad/unpad 2021-05-19 16:03:29 +08:00
r1chardf1d0 6609f706fe update akg && set random seed for stitch case 2021-05-18 09:25:16 +08:00
r1chardf1d0 b1be842d2b add stitch fusion case in ci 2021-05-08 15:17:14 +08:00
wenfangpei db8256e61f adapt for logsoftmax in ascend 2021-05-06 10:13:28 +08:00
mindspore-ci-bot 92355554ed !15412 [GraphKernel]adapt expanders of some ops from gpu to ascend
From: @wenfangpei
Reviewed-by: @gaoxiong1,@ckey_dou
Signed-off-by: @ckey_dou
2021-05-06 09:42:15 +08:00
wenfangpei c41875b318 adapt expanders of some ops from gpu to ascend 2021-05-04 16:32:45 +08:00
dingpeifei d27ad7e797 upgrade_ascend_0428 2021-04-30 15:57:57 +08:00
looop5 e88cdc84ec enhancement reorder_ops pass to support reordering cast and type insensitive operators
support castup, type-insensitive to type-insensitive, castup

refactor reorder_ops

fix compiling

move reorder_ops pass to later

fix abstract

refactor

fix node input num bug
2021-04-25 11:06:48 +08:00
lingyunli63 c48c2430f0 fuse matmul and elementwise in graphkernel 2021-04-14 20:52:35 +08:00
chenlei_autodiff 13fbfca6b9 [graph kernel] add expander ops. 2021-04-09 17:33:06 +08:00
wenfangpei 66d28af79e adapt for layernorm in ascend 2021-04-08 18:11:59 +08:00
mindspore-ci-bot b5bc938deb !12914 [GraphKernel]expander lamb_apply_weight_assign
From: @wenfangpei
Reviewed-by: @anyrenwei,@gaoxiong1,@gaoxiong1
Signed-off-by: @anyrenwei
2021-04-06 17:02:16 +08:00
mindspore-ci-bot f324a9a760 !14553 [GraphKernel] refine cast matmul fusion
From: @lingyunli63
Reviewed-by: @gaoxiong1,@ckey_dou
Signed-off-by: @ckey_dou
2021-04-06 11:07:55 +08:00
lingyunli63 56390330ac cast_Matmul_fusion, when cast cannot fuse forward 2021-04-02 17:32:11 +08:00
wenfangpei a4ad6066b1 expander lamb_apply_weight_assign 2021-04-02 17:28:59 +08:00
mindspore-ci-bot 8634675e2d !14499 [GraphKernel]split UMonad in inputs of op
From: @wenfangpei
Reviewed-by: @dayschan,@ckey_dou,@gaoxiong1
Signed-off-by: @gaoxiong1
2021-04-02 14:25:22 +08:00
wenfangpei 0085a273e7 split UMonad in inputs of op 2021-04-01 14:47:59 +08:00
lingyunli63 8b3823b22c optimizeMatmul 2021-04-01 10:48:48 +08:00
mindspore-ci-bot 69526df01e !14314 [GraphKernel] unify graph kernel pass add_atomic_clean on Ascend and GPU back-end
From: @looop5
Reviewed-by: @gaoxiong1,@gaoxiong1,@dylangeng
Signed-off-by: @dylangeng
2021-03-30 17:11:00 +08:00
mindspore-ci-bot ddf75da542 !14085 [GraphKernel] add some expander ops
From: @chenlei_autodiff
Reviewed-by: 
Signed-off-by:
2021-03-30 15:33:06 +08:00
looop5 76d322464d unify graph kernel pass add_atomic_clean on Ascend and GPU back-end
refactor CanActivateAtomicAdd

use smart pointer
2021-03-30 11:37:41 +08:00
chenlei_autodiff f4289d40f3 add graph kernel expander ops. 2021-03-30 11:19:40 +08:00
mindspore-ci-bot 7149e8c2c9 !14045 [Graph Kernel] add compare test case
From: @zengzitao
Reviewed-by: @gaoxiong1
Signed-off-by:
2021-03-29 09:15:57 +08:00
zengzitao 72c6dad4ba add compare_test case in gpu ci and update akg submodule 2021-03-27 15:28:54 +08:00
lingyunli63 4b966ed40d support matmul on D 2021-03-26 15:57:26 +08:00
mindspore-ci-bot 5b95409022 !13512 add some expander ops
From: @zengzitao
Reviewed-by: 
Signed-off-by:
2021-03-19 15:00:23 +08:00
wenfangpei 043a558ae2 expander lamb_apply_optimizer_assign 2021-03-19 09:54:10 +08:00
zengzitao d0a656f3cd add some expander ops 2021-03-18 19:03:36 +08:00
zengzitao ef3507e973 fix exec order bug about monad 2021-02-18 11:01:06 +08:00
He Wei 7d9a783993 [auto-monad] Support side-effects by auto-monad
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)
```
2021-02-08 09:01:15 +08:00
jinyaohui 30a27b2adb modify Gelu、FastGelu to GeLU and FastGeLU 2021-02-05 17:19:52 +08:00
mindspore-ci-bot e897eb4c41 !11915 Change TensorAdd to Add, merge from r1.1 to master
From: @liangzhibo
Reviewed-by: @ginfung,@zh_qh
Signed-off-by: @zh_qh
2021-02-02 09:16:08 +08:00
l00591931 9ec100d069 Change TensorAdd to Add, from r1.1 to master 2021-02-01 17:53:52 +08:00
looop5 0161209e40 update submoudle akg, close graph kernel ascend ci testcases 2021-02-01 15:59:50 +08:00
looop5 8bbe723603 add Tile infer shape function 2020-12-21 16:50:12 +08:00
mindspore-ci-bot 5f2c84f3cb !9867 Add graph kernel testcases
From: @looop5
Reviewed-by: @ckey_dou,@gaoxiong1
Signed-off-by: @gaoxiong1
2020-12-15 17:17:25 +08:00
looop5 4d8205cd93 Delete unused interface in graph_kernels.py 2020-12-14 19:13:07 +08:00
looop5 56fa56b173 add graph kernel testcases 2020-12-12 14:56:21 +08:00
tronzhang 2190da9946 support atomic clean and change package for akg. 2020-12-02 16:26:41 +08:00
zengzitao 3ef0e9f053 substitute dropout by cudnnuniformreal and dropout 2020-11-26 10:36:02 +08:00
zengzitao 266bfa50bf expand logsoftmax and logsoftmax_grad, delete softmax's cast and fix layernorm op 2020-11-17 09:57:58 +08:00
looop5 f5f66abd06 Add testcases in Ascend back-end for graph kernel 2020-11-16 16:40:12 +08:00
zengzitao 326540cbbd expand layernorm_grad op 2020-11-16 09:03:13 +08:00
zengzitao 28f1db74dd expand maximum_grad minimum_grad dropout_grad op 2020-11-12 10:31:03 +08:00
zengzitao db27783d54 expand tanh_grad and reduce_mean, fix bug and add test_case in ci 2020-11-10 10:37:38 +08:00
zengzitao 53043ae18f support expand fused_adam and fused_adam_weight_decay op 2020-11-05 20:56:49 +08:00
dayschan 0f8f1cdda7 Eliminate redundant parameters while expanding basic ops.
add testcase for Gelu/GeluGrad
2020-11-05 11:14:48 +08:00
mindspore-ci-bot 8d39a8a4b2 !7529 complex arithmetic_simplify
Merge pull request !7529 from zhuxiaochen/1020_allsimplify_1.0
2020-10-23 17:39:38 +08:00
zhu_xiaochen c739f14038 simplify transpose matmul reduce 2020-10-23 14:17:45 +08:00
lingyunli63 a500a57c72 add GraphkernelCSE 2020-10-20 15:29:33 +08:00
Geng_Fei 1455372cf1 add new pass in graph kernel: arithmetic_simplify 2020-10-15 10:54:10 +08:00
dayschan 37a48f6aac GraphKernel supports GPU
1. Update akg submodule
2. Refactor akg_kernel_build, akg_ascend_kernel_build, akg_gpu_kernel_build
3. Add akg_kernel_json_decoder to support converting kernel_json to AnfNode.
4. Add GraphKernel Cost Model. (mindspore/_extends/graph_kernel)
5. Add some GraphKernel passes to GpuSession, move these passes to backend/optimizer/graph_kernel.
6. Add global id for ir files.
7. Fix bug in ConstInputToAttr.
2020-09-09 17:46:50 +08:00
duxiutao 793737ab62 add primitive operator to test_lamb 2020-07-02 16:03:01 +08:00
duxiutao 1e43c609e0 Add test case and fix two bugs
1. add case to guard precision
2. fix a shape bug
3. fix a funcGraph bug
2020-07-02 12:52:15 +08:00