- 02 9月, 2022 1 次提交
-
-
由 xiongkun 提交于
* 1. make list transformer into jit form. 2. fix some bugs in tensor_array, such as append. 3. enhance the function analysis visitor to recognize push/pop. 4. add setter/getter helper to deal with 2+ name sets. * fix ci errors: 1. add to_tensor_array logic in convert_cond 2. fix IfExpr error. 3. fix erros while return_names or push_pop_names is None 4. fix slice error in a[i]=1 where a is tensor_array 5. add pop interface in Variable
-
- 26 8月, 2022 1 次提交
-
-
由 xiongkun 提交于
* while support for python container. It is convenient to convert more dynamic graph codes into static graphs. * cond support python container * 1. make select_input output shape = input[1] 2. add warning in while_loop risky assign * fix 2 problem in GPT export: 1. a bug in while_op no_need_copy_var, which causes gpu memory leakage 2. a bug in undefined_var where the stop_gradient should be False. * change name by code review * format
-
- 19 8月, 2022 1 次提交
-
-
由 xiongkun 提交于
* Make sure that the output of whilep must exist in the input * insert assign in block(0) * add unittest.
-
- 12 7月, 2022 1 次提交
-
-
由 xiongkun 提交于
* change NameVisitor to FunctionScopeAnalysis * polish the logic of undefined var in while_loop. create vars after body execution * replace old NameVisitor in while and fix all CI * Togather with CreateVariableTransformer * add create_variable_transformer * fix bugs * merge * fix some error, TODO: ForNodePreTransform ahead * merge for unite PR * fix conflict with base_transformer PR * fix ci errors, fix [for i in range()] error * fix according to code review
-
- 08 7月, 2022 1 次提交
-
-
由 WangZhen 提交于
* Polish visit function in transformer * Call generic_visit first in visit_While/For * Remove comments * Polish utils.py, move some transformer to base_transformer
-
- 06 7月, 2022 1 次提交
-
-
由 xiongkun 提交于
* add support for control flow block analysis * move FunctionNameLivenessAnalysis into utils * pass test_ifelse.py * remove duplicate data_layer_not_check * pass the test_ifelse.py * fix unittest error . * fix all ci error in first version * temporay disable CreateVariableTransformer * fix ci errors * fix function name liveness analysis bugs * modifty def cond * fix * fix ci error - v2 * fix by code review * change return_name_ids -> return_name
-
- 05 7月, 2022 1 次提交
-
-
由 WangZhen 提交于
* Add BaseTransformer for dy2st error message * Fix return_transformer error * Polish dy2st error info in runtime * Fix UT error * Polish runtime error code
-
- 01 7月, 2022 1 次提交
-
-
由 Aurelius84 提交于
* [Dy2Stat]Enhance nonlocal machanism while returning single var * [Dy2Stat]Enhance nonlocal machanism while returning single var
-
- 30 6月, 2022 1 次提交
-
-
由 xiongkun 提交于
* merge and add base support for non-local for * for and while non-local support * fix ci errors: v1 * fix bug * fix * fix code * fix * fix * fix
-
- 28 6月, 2022 1 次提交
-
-
由 Aurelius84 提交于
* [Dy2Stat]Polish all API name of _jst
-
- 23 6月, 2022 1 次提交
-
-
由 Aurelius84 提交于
* [Dy2Stat]Support nonlocal mechanism in IF ast transformer * support prune return vars in cond * fix unittest * fix unittest * fix static check
-
- 13 6月, 2022 1 次提交
-
-
由 Aurelius84 提交于
* [Dy2Stat]Remove fluid.layers in transformer code * remove useless return_name_vars * fix unittest * fix unittest * fix unittest
-
- 05 6月, 2022 1 次提交
-
-
由 Sing_chan 提交于
* use yapf to format all python file * yapf exclude two unittests file for they rely on writing and reading file, and format will break them * disable diff_py_file because too many diff files cause command following failed
-
- 27 5月, 2022 1 次提交
-
-
由 Aurelius84 提交于
* [Dy2Stat]Replace paddle.jit.dy2stat with _jst * [Dy2Stat]Replace paddle.jit.dy2stat with _jst * refine code style * refine code style
-
- 09 3月, 2022 1 次提交
-
-
由 0x45f 提交于
-
- 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
-