Commit Graph

34 Commits

Author SHA1 Message Date
dayschan d608ffdaf2 explicitly check if graph_kernel is enabled in pynative mode. 2022-02-14 16:07:39 +08:00
zengzitao 6abb0996c9 add warning for graphkernel open on ascend 2021-12-31 16:20:53 +08:00
i-robot b0859101f6 !27781 decouple LiteGraph2AnfGraph from graph_kernel_helper.
Merge pull request !27781 from chenlei_autodiff/lite_callback
2021-12-24 03:16:44 +00:00
chenlei_autodiff 61edce79ee decouple LiteGraph2AnfGraph from graph_kernel_helper. 2021-12-23 10:06:07 +08:00
tronzhang 9bcb3eb1ef Enhance GNN and support graph recompute. 2021-12-16 11:50:59 +08:00
i-robot 5d05248f0b !27456 Fix Static Check on Master
Merge pull request !27456 from jiaoy1224/aot
2021-12-14 09:19:40 +00:00
Yang Jiao 530f9ac999 fix static check on master 2021-12-10 14:32:43 +08:00
zengzitao 6f4aebbe11 adapt ms_cpu ci for graphkernel 2021-12-09 19:44:09 +08:00
dayschan be11003ec7 set the environment variable "MS_GRAPH_KERNEL_FLAGS" to deprecated 2021-12-03 15:33:19 +08:00
tronzhang e2a0c0d613 support parallel for ascend 2021-11-12 15:38:11 +08:00
chenlei_autodiff 6ac7471d5c [GraphKernel] Add Compiling Macros in graph_kernel_flags. 2021-11-09 10:10:29 +08:00
Yang Jiao 2d83f0e9ef fix static-check 2021-10-14 14:28:15 +08:00
dayschan 7502345c8f Add GraphKernelFlags into namespace mindspore::graphkernel 2021-10-08 15:33:46 +08:00
dayschan 32ecd8ee79 GraphKernel supports CPU
only Linux system is supported now.

change the default value of `ENABLE_AKG` to off, and controlled by option `-K`.
the `ENABLE_AKG` is auto enabled when `ENABLE_GPU` or `ENABLE_D` is on.
since now, we can use `ENABLE_AKG` to control the compilation of graphkernel
and akg codes.

fix usage description for option "-K", it should be "[-K on|off]".

LLVM is required by akg for cpu kernels, so AKG for cpu is default disabled now.
2021-09-29 23:34:16 +08:00
i-robot 033b4706f2 !21235 Add pass TransformOpOptimizer
Merge pull request !21235 from DeshiChen/0719_elim_transform
2021-08-31 08:36:25 +00:00
zengzitao 7d6c6b17bb fix master warnings 2021-08-31 11:14:50 +08:00
dayschan e6b1855174 Completed pass transform_op_optimizer
modifications for pass transform_op_optimizer:
1. Changed the maxflow-mincut algorithm to the Dinic's Algorithm,
   since bug exists in the original ISAP codes.
   if the algorithm is slow, we can apply some optimization for it. (e.g. current-arc optimization)
2. Added the pass TransformOpOptimizer in OptLevel_3.
   this pass collects nodes around the specific transform operator (only Transpose now),
   and use the mincut algorithm to get a plan, then re-link the original graph and
   re-inference the shape and format of graph.

modifications for litegraph:
1. the class Node inherits from std::enable_shared_from_this,so we can get a shared_ptr by a pure pointer.
2. modified the Infer interface. it don't change the node, only inference the infos and return them.
2021-08-30 11:03:10 +08:00
i-robot eba4fa8224 !22466 [GraphKernel] add fusion ops level flag for graph kernel fusion, gpu use level max, ascend use level 0
Merge pull request !22466 from r1chardf1d0/master
2021-08-29 01:21:09 +00:00
r1chardf1d0 7ec4649805 [GraphKernel] add stable ops only flag for graph kernel fusion, and set ascend backend enable default 2021-08-28 16:15:10 +08:00
chenfei 72cab0262e code clean 2021-08-25 09:29:01 +08:00
djc b077aa1cab [feat] [assistant] [I3T96T] add new Dataset operator CMUARCTICDataset 2021-08-22 16:26:45 +08:00
djc 4e6f7dc97d [feat] [assistant] [I3T96X] add new Dataset operator LibriSpeechDataset 2021-08-22 13:39:37 +08:00
cy 4105a247b7 add low precison 2021-08-04 09:52:42 +08:00
Yang Jiao e2cfc516eb refctor arithmetic simplify 2021-07-27 11:29:26 +08:00
7347157+joylvliang@user.noreply.gitee.com ab32ebc758 fix_warning_of_codes 2021-07-22 16:50:48 +08:00
dayschan 3ab53dd26d Send compilation attrs to akg
1. Add a new message type "AKG/ATTR" in AkgKernelBuilder.
   the attrs was sent before the kernel infos.
2. Send "online_tuning" attribute when the flag is not zero,
   but error occurs in the latest akg submodule.
3. Send "repository_path" attribute when the flag is not empty.
4. Add a new value "compute_capability" into kernel info when the processor is GPU.
2021-07-16 16:52:18 +08:00
lingyunli63 3679e99fe8 fix recompute_fuse with reshape user 2021-06-24 17:36:35 +08:00
lingyunli63 a995bea507 recompute_fuse 2021-06-22 20:39:11 +08:00
dayschan 4dde1d8e2d Add default value for graph_kernel_flags
some flags, like "enable_stitch_fusion" and "enable_parallel_fusion", are enabled by default when opt_level=3.
and user can manually disable these flags.
2021-06-11 10:33:27 +08:00
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".
2021-05-28 14:50:37 +08:00
dayschan 490c0521ac Disable GraphKernel in PynativeMode 2021-04-28 23:19:53 +08:00
tronzhang 8ff3c16778 add swtich for parallel fusion and default is off 2021-04-14 17:36:24 +08:00
r1chardf1d0 3b32995936 enable stitch fusion on bert 2021-04-09 18:29:55 +08:00
dayschan 11ee3b1624 add context graph_kernel_flags
used the flag "opt_level" to control GraphKernel,
0 means disabled while non-zero value means enabled.
the default value is controlled by context "enable_graph_kernel",
but if it's also set in "graph_kernel_flags", then the flag will prevail.

supported the whitelist and blacklist operators for GraphKernelExpander.
"enable_expand_ops", "enable_expand_ops_only", "disable_expand_ops".
2021-03-24 11:08:26 +08:00