- 24 1月, 2022 1 次提交
- 
- 
由 0x45f 提交于
 
- 
- 10 12月, 2021 1 次提交
- 
- 
由 0x45f 提交于* remove outer comment when dy2stat * remove all comment * add unit test 
 
- 
- 19 11月, 2021 1 次提交
- 
- 
由 0x45f 提交于* support `for i in [1,2,3]` statements in dy2stat * add test case * fix ci * remove wrong code 
 
- 
- 03 11月, 2021 1 次提交
- 
- 
由 0x45f 提交于* Support Py3 type annotations in @to_static * support type hint for args in func * support type hint assign * if annotation and value(Constant) are diffent type, we use value type * polish type_from_annotation() * code format * code format * remove useless commentary * fix review Co-authored-by: NAurelius84 <zhangliujie@baidu.com>
 
- 
- 05 8月, 2021 1 次提交
- 
- 
由 0x45f 提交于* integrated gast library * integrated gast library * fix unittest and remove ast2.py * remove 'gast' from __all__ in __init__.py * add copyright in other files * fix copyright 
 
- 
- 24 6月, 2021 1 次提交
- 
- 
由 Aurelius84 提交于* support type hint * fix unittest 
 
- 
- 21 6月, 2021 1 次提交
- 
- 
由 tianshuo78520a 提交于* del py2 code2 * fix test timeout 
 
- 
- 17 6月, 2021 1 次提交
- 
- 
由 Aurelius84 提交于* support non-tensor type * fix unittest failed * add unittest with prune * rm unused code * coverage * fix two or 
 
- 
- 09 4月, 2021 1 次提交
- 
- 
由 Aurelius84 提交于* support DictCmp and zip grammar * fix code style 
 
- 
- 24 3月, 2021 1 次提交
- 
- 
由 Huihuang Zheng 提交于Our old `loop_body` function may return single element when `loop_vars` just contains only 1 element, which can cause bug. The key point of this PR is forcing `loop_body` functions always return tuple. 
 
- 
- 04 3月, 2021 1 次提交
- 
- 
由 liym27 提交于
 
- 
- 18 2月, 2021 1 次提交
- 
- 
由 Huihuang Zheng 提交于Dy2stat didn't support tuple as iteration variable in the past. This PR added there main cases: 1). Non-enumerate case: for var1, var2 in var|var.numpy() will be re-written as: for FOR_ITER_TUPLE_PREFIX_x in var | var.numpy(): var1 = FOR_ITER_TUPLE_PREFIX_x[0] var2 = FOR_ITER_TUPLE_PREFIX_x[1] 2). Enumerate out tuple case: for t in enumerate(var|var.numpy) will be rewritten as: for FOR_ITER_TUPLE_INDEX_PREFIX_x, FOR_ITER_TUPLE_PREFIX_x in enumerate(var|var.numpy): t = (FOR_ITER_TUPLE_INDEX_PREFIX_x, FOR_ITER_TUPLE_PREFIX_x) 3). Enumerate inner tuple case: for i, (var1, (var2, va3)) in enumerate(var|var.numpy()) will be re-written as: for i, FOR_ITER_TUPLE_PREFIX_x in var | var.numpy(): var1 = FOR_ITER_TUPLE_PREFIX_x[0] var2 = FOR_ITER_TUPLE_PREFIX_x[1][0] var3 = FOR_ITER_TUPLE_PREFIX_x[1][1]
 
- 
- 20 1月, 2021 1 次提交
- 
- 
由 Aurelius84 提交于* add paddle. * add unittest 
 
- 
- 14 1月, 2021 1 次提交
- 
- 
由 Chen Weihang 提交于
 
- 
- 18 12月, 2020 2 次提交
- 
- 
由 Huihuang Zheng 提交于Enable jit.save to Save Without Running. 
- 
由 liym27 提交于Support to transformfor ele in var stms in which var is a slice of Tensor. 
 
- 
- 14 12月, 2020 1 次提交
- 
- 
由 liym27 提交于[Dy2Stat] 1. Fix bug of for-range stmts. 2. Support that step value is negative in for-range stmts (#29519) 1. Fix error in _build_cond_stmt of for-range stmts. 2. Support that step value is negative in for-range stmts 3. Fix code because of the diff between Py2 and Py3 
 
- 
- 04 12月, 2020 1 次提交
- 
- 
由 liym27 提交于[Dy2Stat] Fix bug: Do not use gast.Subscript to replace gast.Name in when transforming for_enumerate_loop (#29310) 
 
- 
- 30 11月, 2020 1 次提交
- 
- 
由 WeiXin 提交于* Changed a variable name error * Add comments * Move member functions of TranslatedLayer out of function * edit code according to review * Edit input argument of '_run_static_graph' * reset due to Segmentation fault * rename variables when stitching graph * modify code according CI * Add comments to '__i_m_p_l__' * remove blanks befor 'Get...' * edit code according to review * Add a comment to '_execution_method_creator' * Edit a comment to '_execution_method_creator' 
 
- 
- 19 11月, 2020 1 次提交
- 
- 
由 Huihuang Zheng 提交于Fix convert_callmMay be called multiple times in Dy2stat. Also strip some strings to make sure no influence from blank spaces. 
 
- 
- 26 10月, 2020 1 次提交
- 
- 
由 Aurelius84 提交于* Join break cond with while cond * remove usless code * refine the if code * Split into BreakTransfromOptimizer * add BreakTransformOptimizer in ast_transformer * add more comment 
 
- 
- 29 9月, 2020 1 次提交
- 
- 
由 Huihuang Zheng 提交于Refine Dy2stat APIs to 2.0rc After discussion, we accepted 3 key points from reviewers: 1. In 2.0rc we changed dygraph_to_static folder to dy2static 2. Keep the three files: convert_call_func.py, convert_operators.py, variable_trans_func.py 3. Remove convert_operators path when users import convert_xxx. After this PR, users can import convert_xxx APIs by: `import paddle.jit.dy2static.convert_xxx` The file structure will be: ``` jit dy2static convert_operators.py convert_func_call.py variable_trans_func.py ``` Detail changed API in files: In python/paddle/jit/dygraph_to_static/convert_call_func.py: from ...fluid.dygraph.dygraph_to_static.convert_call_func import convert_call #DEFINE_ALIAS In python/paddle/jit/dygraph_to_static/convert_operators.py: from ...fluid.dygraph.dygraph_to_static.convert_operators import cast_bool_if_necessary #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_assert #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_ifelse #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_len #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_logical_and #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_logical_not #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_logical_or #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_print #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_var_dtype #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_var_shape #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_while_loop #DEFINE_ALIAS In python/paddle/jit/dygraph_to_static/variable_trans_func.py: from ...fluid.dygraph.dygraph_to_static.variable_trans_func import create_fill_constant_node #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.variable_trans_func import create_static_variable_gast_node #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.variable_trans_func import data_layer_not_check #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.variable_trans_func import to_static_variable #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.variable_trans_func import to_static_variable_gast_node #DEFINE_ALIAS
 
- 
- 02 9月, 2020 1 次提交
- 
- 
由 liym27 提交于
 
- 
- 31 8月, 2020 1 次提交
- 
- 
由 Aurelius84 提交于* Fix Python Version compatibility * add import six 
 
- 
- 27 8月, 2020 1 次提交
- 
- 
由 Aurelius84 提交于* add InputSpec * add unittest for tensorSpec and SimpleNet 
 
- 
- 21 8月, 2020 1 次提交
- 
- 
由 Huihuang Zheng 提交于As the title 
 
- 
- 19 8月, 2020 2 次提交
- 12 8月, 2020 1 次提交
- 
- 
由 liym27 提交于[Dy2Stat] Removes temporary files created during the transformation of dygraph to static graph. (#26150) 
 
- 
- 02 7月, 2020 1 次提交
- 
- 
由 Zhen Wang 提交于
 
- 
- 19 6月, 2020 1 次提交
- 
- 
由 Aurelius84 提交于* Refine caches of converting func test=develop * fix if statement test=develop * refine cache code test=develop * rm unuse import statement test=develop * Polish code comment test=develop 
 
- 
- 09 6月, 2020 1 次提交
- 
- 
由 liym27 提交于* Move function 'convert_len' to file convert_operators.py * Support that for statements are transformed to while statements. * Fix bug: raise None -> return None. * Support variable loaded and created in loop. * Use int64 in Py2 and Py3 in function to_static_variable. 
 
- 
- 03 6月, 2020 1 次提交
- 
- 
由 Chen Weihang 提交于* support for iter & enumerate varbase, test=develop * revert IsControlFlowVisitor change, test=develop 
 
- 
- 21 5月, 2020 1 次提交
- 
- 
由 liym27 提交于[Dy2Stat]Support to transform sequence assignments and multi-target assignments to normal assignments (#24643) 
 
- 
- 19 5月, 2020 1 次提交
- 
- 
由 Chen Weihang 提交于
 
- 
- 18 5月, 2020 1 次提交
- 
- 
由 Chen Weihang 提交于* initial test * for enumerate basic implement, test=develop * update unittests, test=develop * refine unittests to adapt new training mode, test=develop * refactor for node stmts parsing code, test=develop * self-review & polish details, test=develop 
 
- 
- 13 5月, 2020 1 次提交
- 
- 
由 Aurelius84 提交于* fix bug with `if Tensor` in is_control_flow test=develop * remove continue test=develop 
 
- 
- 12 5月, 2020 1 次提交
- 
- 
由 liym27 提交于
 
- 
- 24 4月, 2020 1 次提交
- 
- 
由 liym27 提交于* Simplify code for gast.If in is_control_flow_to_transform. * Move IsControlFlowVisitor to file utils. * Don't use convert_call for build-in func in CallTransformer. * Optimize api is_control_flow_to_transform. * Polish the document of IsControlFlowVisitor. 
 
- 
- 17 4月, 2020 1 次提交
- 
- 
由 liym27 提交于* Move BasicApiTransformer to a separate file. test=develop * Fix a bug: A api in module is not a real dygraph api in dygraph_to_static. test=develop 
 
- 
