dayschan
2ac8c65327
Add GraphKernelPassManager to manage the passes of GraphKernel
Refactor the original "PassManager" class, and derive the "GraphKernelPassManager"
GraphKernel's ir files are dumped into a new sub-directory "graph_kernel" in the original "verbose_ir_files"
All GraphKernel's passes are divided into 3 levels, and controlled by the flag "opt_level" by default.
when the opt_level is greaterequal to the pass's level, this pass will run.
The default "opt_level" is 2 when GraphKernel is enabled.
Levels:
1. Basic features, like cluster, splitter, and some preprocess, postprocess.
2. All stable features, mainly includes the optimization passes.
3. Experimental features, like stitch-fusion, parallel-fusion.
The two flags "enable_pass" and "disable_pass" are available in this commit.
User can manually enable some passes when it's disabled by "opt_level", or disable the enabled passes,
by specifying that pass in this format: "stage_id.pass_id" or "stage_name.pass_name", multiple passes are separated by comma(",")
the stage/pass index and stage/pass name can be found from the ir filename.
e.g. "--enable_pass=cluster.graph_kernel_expander,1.1,1.2"
Others:
1. the pass "tensor_promotion" is not useful, remove it.
2. put the pass "InsertPadOps" before "ArithmeticSimplify".
4 years ago
mindspore-ci-bot
f91a365564
!16322 [GraphKernel] Enable matmul for gpu
From: @lingyunli63
Reviewed-by:
Signed-off-by:
4 years ago
lingyunli63
afc69b16f7
enable gpu gk MatMul and insert pad/unpad
5 years ago
dayschan
fd61467ace
Bugfix in ArithmeticSimplify
1. clone PrimitivePtr before setting attr, operators may use the same shared_ptr.
2. bugfix for the reduce-reduce pattern when keep_dims is true.
4 years ago
mindspore-ci-bot
4b242fb202
!16422 fix build info changed in ssd network
From: @looop5
Reviewed-by: @anyrenwei,@gaoxiong1
Signed-off-by: @gaoxiong1
4 years ago
zengzitao
62b547b9d3
close bn and bn_grad in expander.cc
4 years ago
looop5
b958dded60
fix build info changed in ssd network
4 years ago
mindspore-ci-bot
858c3b19b6
!16307 add cse before and after SpreadUpdateState
From: @looop5
Reviewed-by: @ckey_dou,@gaoxiong1
Signed-off-by: @gaoxiong1
4 years ago
mindspore-ci-bot
7083621827
!16418 Set kernel_info for GraphKernel's parameters
From: @dayschan
Reviewed-by: @gaoxiong1,@anyrenwei
Signed-off-by: @anyrenwei
4 years ago
mindspore-ci-bot
6f46b44c2a
!16377 Fix static-check problems
From: @liu-yihong536
Reviewed-by: @gaoxiong1,@anyrenwei
Signed-off-by: @anyrenwei
4 years ago
looop5
869e07dd2b
add cse after SpreadUpdateState
4 years ago
Yang Jiao
f7bb79445b
fix circle bugs
4 years ago
dayschan
1ca07c8b1a
Set kernel_info for GraphKernel's parameters
In some place, we directly visit the node's input kernel_info.
but when the node's input is a Parameter, it will fail.
4 years ago
liuyihong
21e87ebd8c
Fix static-check problems
4 years ago
mindspore-ci-bot
330905d05d
!15926 [GraphKernel] clean code for graph kernel files.
From: @chenlei_autodiff
Reviewed-by: @gaoxiong1,@ckey_dou,@gaoxiong1,@ckey_dou
Signed-off-by: @ckey_dou,@ckey_dou
4 years ago
mindspore-ci-bot
1e62620bd4
!16241 [GraphKernel] Exclude the nodes of dynamic shape
From: @dayschan
Reviewed-by: @gaoxiong1,@ckey_dou
Signed-off-by: @ckey_dou
4 years ago
chenlei_autodiff
8bfe604d96
[GraphKernel] clean code fix.
4 years ago
mindspore-ci-bot
909b0191c3
!16090 Fix Static Check
From: @coding2020
Reviewed-by: @gaoxiong1,@ckey_dou
Signed-off-by: @ckey_dou
4 years ago
mindspore-ci-bot
f247cc2db7
!16047 [GraphKernel]adapt batchmatmul for GraphKernel in ascend
From: @wenfangpei
Reviewed-by: @gaoxiong1,@ckey_dou
Signed-off-by: @ckey_dou
4 years ago
dayschan
07b0f1889a
Exclude the dynamic shape operators in GraphKernel
4 years ago
mindspore-ci-bot
76bf602854
!16062 [GraphKernel] Optimize the pass ShrinkUpdateState
From: @dayschan
Reviewed-by: @ckey_dou,@gaoxiong1
Signed-off-by: @gaoxiong1
4 years ago
mindspore-ci-bot
493f73822d
!16124 [GraphKernel] Bugfix for DropoutExpander about kernel_info
From: @dayschan
Reviewed-by: @ckey_dou,@gaoxiong1
Signed-off-by: @gaoxiong1
4 years ago
cy
f7dd0f29f6
fix static check warning
4 years ago
wenfangpei
2e2e850b4a
adapt batchmatmul for GraphKernel in ascend
4 years ago
dayschan
dabc0db9c2
fix static check problems
4 years ago
dayschan
4ca8614af9
Bugfix for DropoutExpander
When creating the new GKDropout, the original process used the Dropout's input's kernel_info to infer the kernel_info of new node.
but if the input is a Tensor, then it hasn't kernel_info, which causes the GKDropout's input_kernel_info to be invalid.
In this submit, I manually set the kernel_infos to ensure they are always valid.
4 years ago
mindspore-ci-bot
44d3dc299c
!15093 [GraphKernel] Refactor GraphKernelCluster
From: @dayschan
Reviewed-by: @ckey_dou,@gaoxiong1
Signed-off-by: @gaoxiong1
4 years ago
mindspore-ci-bot
a716fbfabb
!15957 [GraphKernel]Fix Static Check
From: @jiaoy1224
Reviewed-by: @gaoxiong1,@gaoxiong1,@ckey_dou
Signed-off-by: @ckey_dou
4 years ago
dayschan
49fb9fb1e1
Optimize graphkernel pass ShrinkUpdateState
the original pass used mng->RemoveRoot and mng->KeepRoot to maintain manager,
but in some network it works slowly. so we use mng->Replace instead.
4 years ago
Yang Jiao
e8ab41ac23
fix static check warnings
4 years ago
mindspore-ci-bot
bf80112e17
!15943 [GraphKernel]extend inputs of update if which have multiple outputs
From: @wenfangpei
Reviewed-by: @gaoxiong1,@ckey_dou
Signed-off-by: @ckey_dou
4 years ago
mindspore-ci-bot
ed539597c2
!15415 [GraphKernel]adapt for logsoftmax in ascend
From: @wenfangpei
Reviewed-by: @gaoxiong1,@ckey_dou,@gaoxiong1,@ckey_dou
Signed-off-by: @ckey_dou,@ckey_dou
4 years ago
mindspore-ci-bot
6c63e01112
!15952 [GraphKernel] Clean code warning in master branch.
From: @tronzhang
Reviewed-by: @gaoxiong1,@ckey_dou
Signed-off-by: @ckey_dou
4 years ago
dayschan
3bf0d8a19a
Refactor GraphKernelCluster
Use a disjoint-set to maintain the clusters before building anf-graph, to speed up the process of building graph.
Dump the change of nodes to file if the graphkernel flag "dump_as_text" is set.
The algorithm of CheckCircle is unchanged.
Reuse the FuseNodesToSubGraph interface.
4 years ago
mindspore-ci-bot
71ab230aa0
!15458 [GraphKernel]expanders of some fusion ops
From: @wenfangpei
Reviewed-by: @ckey_dou,@gaoxiong1
Signed-off-by: @ckey_dou
4 years ago
mindspore-ci-bot
09008c005c
!15965 [GraphKernel]clean code
From: @lingyunli63
Reviewed-by: @ckey_dou,@gaoxiong1
Signed-off-by: @gaoxiong1
4 years ago
wenfangpei
62cc2990a6
extend inputs of update if which have multiple outputs
4 years ago
tronzhang
e006626c33
clean warning in akg_kernel_metadata.cc/akg_ascend_kernel_mod.cc/add_atomic_clean.cc/add_atomic_clean_gpu.cc
4 years ago
wenfangpei
4174a7b38f
expanders of some fusion ops
4 years ago
wenfangpei
db8256e61f
adapt for logsoftmax in ascend
4 years ago
mindspore-ci-bot
6c292ef9fd
!15910 [GraphKernel] clean code for graph_kernel_splitter* & add_stitch_atomic*
From: @r1chardf1d0
Reviewed-by: @gaoxiong1,@ckey_dou
Signed-off-by: @ckey_dou
4 years ago
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
4 years ago
mindspore-ci-bot
0f2f54915b
!15924 [GraphKernel]Fix static-check problems for graph_kernel files
From: @zengzitao
Reviewed-by: @ckey_dou,@gaoxiong1
Signed-off-by: @gaoxiong1
4 years ago
wenfangpei
2138a92875
fix wanring about static-check
4 years ago
wenfangpei
c41875b318
adapt expanders of some ops from gpu to ascend
4 years ago
r1chardf1d0
c4c69bf5e8
[GraphKernel] clean code for graph_kernel_splitter* & add_stitch_atomic_clean_gpu*
4 years ago
lingyunli63
8d54da2a79
clean code
4 years ago
zengzitao
4b6fc40c25
fix static warnings for some graph_kernel files
4 years ago
looop5
1c62823cfe
clean code of several graph kernel source files
fix compiling
4 years ago
mindspore-ci-bot
3bd51c88f4
!14580 [auto-monad] Enforce order of exection for Loads user nodes in frontend
From: @hwhewei
Reviewed-by: @zh_qh,@ginfung
Signed-off-by: @zh_qh
4 years ago