Commit Graph

181 Commits

Author SHA1 Message Date
lianliguang 7227b61979 modify info when infer error 2021-09-23 15:54:43 +08:00
huanghui 97250978c4 fix the debug info about the function decorated by @ms_functon 2021-09-23 14:43:02 +08:00
jiangshuqiang c2bd061889 fix summary isolation 2021-09-18 10:59:14 +08:00
i-robot bbdacd41f4 !20585 add security isolate for save_graphs
Merge pull request !20585 from huanghui/add-security-isolate-for-DumpIR
2021-09-15 01:25:46 +00:00
i-robot db19a40280 !23365 add print op security
Merge pull request !23365 from fangzehua/print_sec
2021-09-14 09:01:31 +00:00
i-robot c6a99428cd !23153 Update the operator in order to let users better understand the reason for the error of the operator part: nn_ops and array_ops
Merge pull request !23153 from dinglinhe/dlh_code_ms_I43QY0_nn_ops
2021-09-14 06:33:39 +00:00
huanghui ba66c0d491 add security isolate for save_graphs 2021-09-14 10:24:12 +08:00
dinglinhe 9a8c1b3c73 array_ops error recti and others 2021-09-14 09:12:02 +08:00
fangzehua 4ccc635a07 add print security 2021-09-13 17:45:36 +08:00
zhangzhaoju 4296881a16 syntax 2021-09-13 15:20:53 +08:00
Zhang Qinghua 7203989c26 Support fallback feature in Graph mode (1). 2021-09-06 16:00:03 +08:00
Zhang Qinghua a137fa1d0b Optimize the Executors routines.
- Fix the key generating.
- Distinguish the executors.
2021-08-28 17:36:12 +08:00
Zhang Qinghua aef396f9f2 Support ListComp and GeneratorExp in Graph Mode. 2021-08-06 11:44:57 +08:00
huanghui 3e17650172 Raise NotImplementedError when parsing the numpy methods, but not the numpy constant. 2021-08-03 14:33:22 +08:00
zhousiyi 9319eff958 change the error type from RuntimeError to TypeError 2021-07-22 06:38:12 +00:00
zhousiyi b590f6d929 don't replace u with fprop_u in primal_graph and bprop_fg 2021-07-19 08:14:40 +00:00
mindspore-ci-bot e5a189a4f0 !17520 Optimize exception info when compile net failed
From: @irmo
Reviewed-by: @ginfung,@zh_qh
Signed-off-by: @zh_qh
2021-06-05 12:04:28 +08:00
mindspore-ci-bot 7d9bf65654 !16755 support list add list in net in GraphMode.
From: @fenglovebei
Reviewed-by: @zh_qh
Signed-off-by: @zh_qh
2021-06-04 16:37:40 +08:00
huanghui 29f632613f optimize log 2021-06-04 12:32:44 +08:00
fenglovebei 76b884dea9 list add list 2021-06-03 21:16:30 +08:00
huanghui 0610a8d99c 9fdc0035a0 2021-05-29 10:31:23 +08:00
Zhang Qinghua cd7f7d40fb Support pass args or|and kwargs for OP CreateInstance. 2021-04-29 14:14:58 +08:00
zhangzhaoju 6a2aee492c Clean code that not used 2021-04-22 16:24:05 +08:00
buxue 6f1105ea79 show accurate error line when use user defined class 2021-04-01 21:52:00 +08:00
buxue 8c47ce1803 show accurate error info and error lines when use unsupported builtin function 2021-03-31 12:33:38 +08:00
buxue d830a2b55a optimize exception mode when use undefined name in if for and while 2021-03-27 17:28:52 +08:00
l00591931 923dd4b77a enable zero dimension tensor when input is data 2021-03-24 15:46:17 +08:00
buxue e3056ed9b2 show accurate code line when use uninitialized var in for 2021-03-21 17:50:58 +08:00
mindspore-ci-bot a1c3f55aca !13197 support item negative index bprop
From: @zhangbuxue
Reviewed-by: @ginfung
Signed-off-by:
2021-03-12 15:52:26 +08:00
buxue 50ee325b96 support item negative index bprop 2021-03-12 13:58:46 +08:00
buxue 2551f5ea7e support name or attribute ast.Expr 2021-03-11 21:40:33 +08:00
Zhang Qinghua 8b8c59f01e Optimize the compile performance in Parser, FG, Manager and Renormalize:
---
Remove the routine of handling isolated nodes in Renormalize.
Add isolated nodes from Parser&Resolver.
Modify isolated nodes handling in FG&Manager.
Optimize the renormalize routines.
Other optimizations.
2021-03-04 16:01:54 +08:00
mindspore-ci-bot f269f3fc8d !12231 Support ad for scalar inputs
From: @ginfung
Reviewed-by: 
Signed-off-by:
2021-02-26 15:50:32 +08:00
mindspore-ci-bot 6808816cb2 !12618 support index by negative number
From: @zhangbuxue
Reviewed-by: 
Signed-off-by:
2021-02-26 15:49:14 +08:00
buxue 610300335f support index by negative number 2021-02-26 12:49:25 +08:00
yujianfeng 41189781f3 support scalar input for cell 2021-02-25 09:56:15 +08:00
buxue f8a00d52af support invert bool tensor 2021-02-24 17:47:07 +08:00
buxue 47dd17a325 support convert ValueDict to py dict 2021-02-23 09:27:46 +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
buxue 899d6114a4 improve grad of first input 2021-02-05 12:36:37 +08:00
buxue 5ede9ffcca improve isinstance 2021-02-02 21:12:14 +08:00
l00591931 9ec100d069 Change TensorAdd to Add, from r1.1 to master 2021-02-01 17:53:52 +08:00
mindspore-ci-bot 9fa0499fa0 Change GatherV2 to Gather r1.1 to master 2021-01-30 14:13:47 +08:00
mindspore-ci-bot b9e1c3f045 !11530 support call inner net attr
From: @zhangbuxue
Reviewed-by: 
Signed-off-by:
2021-01-27 16:50:43 +08:00
buxue 3d33c4fed3 support call inner net attr 2021-01-27 15:08:29 +08:00
buxue 7c4b7203b0 add dtype shape and value in __str__ and __repr__ of Parameter 2021-01-27 11:04:24 +08:00
mindspore-ci-bot fd6dc1b060 !11177 modify Tensor
From: @Somnus2020
Reviewed-by: 
Signed-off-by:
2021-01-22 11:37:11 +08:00
lilei 7d9f5f6dba modify Tensor 2021-01-21 17:46:34 +08:00
buxue 2ea8b9e738 add dict for isinstance 2021-01-21 17:30:35 +08:00
buxue e8cd572bc2 add check for outermost net inputs type and support isinstance first arg an empty list 2021-01-20 14:48:06 +08:00
buxue 15593dc98f improve isinstance function in graph mode 2021-01-18 19:18:48 +08:00
buxue 69d9a33ddb show line of code when parse or resolve phase exception 2021-01-16 16:31:04 +08:00
mindspore-ci-bot eacc8bac89 !10755 [Numpy-Native] Add new numpy-native interfaces to mindspore.numpy
From: @yanglf1121
Reviewed-by: 
Signed-off-by:
2021-01-15 10:04:17 +08:00
buxue 7eaf84d07a remove attr support_non_tensor_input of cell 2021-01-14 16:19:23 +08:00
yanglf1121 72903c11c8 add array_ops, math_ops and tensor ops 2021-01-14 15:32:36 +08:00
buxue acec35d4d4 support non tensor inputs 2021-01-14 09:21:01 +08:00
buxue 6d395c1d3f keep consistent in Graph mode and PyNative mode for 'isinstance' 2021-01-05 21:36:10 +08:00
buxue 1a7c161e73 support len of a Tensor 2020-12-26 17:02:25 +08:00
buxue aeeef7607a remove the 'raise' in construct of Cell 2020-12-17 10:54:42 +08:00
buxue 2530943a7f optimize list getitem in bprop 2020-12-15 15:00:49 +08:00
buxue 70d12aae26 add detailed and accurate description for support non tensor inputs for outermost net. 2020-12-12 16:54:08 +08:00
l00591931 3189868a15 Assignment enable index smaller than 0 2020-12-07 17:09:03 +08:00
mindspore-ci-bot 45b705bca0 !9129 support abs() and mean() method for Tensor object
From: @bairongz
Reviewed-by: 
Signed-off-by:
2020-12-01 19:03:42 +08:00
Bairong 623b2e3f99 support abs and mean of Tensor 2020-12-01 11:34:12 +08:00
buxue d6f91133c3 Support the outermost layer network inputs are list or dict or scalar 2020-11-30 20:21:38 +08:00
mindspore-ci-bot a321f402c8 !8579 Add view function for tensor
From: @liangzhibo
Reviewed-by: @zh_qh,@chenfei52
Signed-off-by: @zh_qh
2020-11-16 14:37:21 +08:00
l00591931 7a192973ff Add view function for tensor 2020-11-16 10:49:19 +08:00
mindspore-ci-bot c11c79170e !8554 Add expand_as function to tensor
From: @liangzhibo
Reviewed-by: @zh_qh,@chenfei52
Signed-off-by: @zh_qh
2020-11-13 15:19:01 +08:00
l00591931 ba7ee2aa13 add expand_as function 2020-11-13 11:42:54 +08:00
mindspore-ci-bot f16509388c !8409 Multi-dimensional list value assignment
From: @liangzhibo
Reviewed-by: @chenfei52
Signed-off-by:
2020-11-12 14:36:20 +08:00
l00591931 c5b5a6719c Enable multi-dimensional list value assignment 2020-11-11 09:25:12 +08:00
mindspore-ci-bot b3855530e3 !7838 Enumerate function enable tensor as input
Merge pull request !7838 from LiangZhibo/master
2020-11-05 11:33:02 +08:00
l00591931 6f165ee5e3 enumerate function and enumerate test case added 2020-11-02 21:11:52 +08:00
simson 3b21822824 get keys and values from dictionary & set tuple to dictionary 2020-10-29 18:06:06 +08:00
yujianfeng 18a76ff3c5 Check whether the network args are tensors in the compile phase 2020-10-19 11:46:10 +08:00
buxue 559c741cce improve the way passing ags of partial 2020-10-12 09:40:20 +08:00
Zhang Qinghua 6c72d88ba1 Set top graph parameters' name as original graph parameters. 2020-09-21 17:44:02 +08:00
buxue 14f6c95c28 add overflow check for make_range and optimize isinstance processing 2020-09-17 19:47:10 +08:00
buxue 458498900c support not in and add check for grad_with_sens with no sense provide. 2020-09-16 17:28:17 +08:00
mindspore-ci-bot 8bf5ac1c15 !6032 [bug]add import for ops in ops.py in __init__
Merge pull request !6032 from vlne-v1/change_ops_import
2020-09-12 16:57:15 +08:00
Wei Luning 7b6899fdc0 add import of ops in in ops __init__ 2020-09-12 15:29:43 +08:00
buxue b9c9046b93 support function as condition of if 2020-09-11 17:43:07 +08:00
buxue 4d59fe9ee1 add check for mod when y in (-1, 0) 2020-09-02 18:10:00 +08:00
buxue 4168c51f0d add check tensor when graph output is a const or parameter 2020-08-31 17:17:24 +08:00
kpy 44b738e8ac fix grad all ci bug 2020-08-26 18:28:35 +08:00
mindspore-ci-bot 314c5ad055 !5172 remove name arg from gradoperation
Merge pull request !5172 from riemann_penn/remove_name_args_from_gradoperation
2020-08-26 16:55:57 +08:00
Wei Luning 24a10225cf change base class of ref to tensor in cpp 2020-08-26 12:41:25 +08:00
panyifeng 1a54785fe2 remove name arg from gradoperation 2020-08-26 11:16:57 +08:00
panyifeng 637e812347 remove global grad ops 2020-08-24 16:50:09 +08:00
fary86 38083e055a Fix coredump missing return statement after while loop 2020-08-18 14:16:21 +08:00
buxue 09f1a4bbaf support axis is None for all and any interface in graph mode. 2020-08-17 17:53:02 +08:00
buxue 35677ac098 support two mstypes do equal. 2020-08-12 09:12:46 +08:00
panyifeng 34e50e5d6e fix cell bprop 2020-08-07 10:57:01 +08:00
buxue ace34525cd improve interface '__bool__' for tensor 2020-08-05 16:14:14 +08:00
mindspore-ci-bot 5827ba9a8a !3940 View code support interface 'all' and 'any' of tensor
Merge pull request !3940 from zhangbuxue/support_interface_all_and_any_of_tensor
2020-08-04 20:08:44 +08:00
buxue 2c4cb49a11 support interface 'all' and 'any' of tensor 2020-08-04 18:24:56 +08:00
mindspore-ci-bot 2da29bce66 !3370 same graph used in different context should be treat differently.
Merge pull request !3370 from xychow/fix-context-dup
2020-08-04 10:56:04 +08:00
buxue b075674cf2 support tensor attr shape and dtype in graph mode 2020-08-03 17:09:31 +08:00
zhousiyi f926650c64 if AbstractFunction comparison succeed in NewContext, then the evaluator should use the same one, otherwise one of the evaluator will not be evaluated.
if funcgraph or metafuncgraph call it recursively, then anf_node should be used as tracking_id to discriminate the first occurcance and the
recursive occurance.
add anf_node to PrimitiveAbstractClosure hash() to reduce cost of GetEvaluatorFor().

ignore the tracking_id to make cse work.
2020-08-03 07:57:07 +00:00
panyifeng 598bfa0205 add sparse operators 2020-07-30 17:18:23 +08:00