1. 19 10月, 2022 1 次提交
  2. 10 10月, 2022 1 次提交
  3. 27 9月, 2022 1 次提交
  4. 22 9月, 2022 1 次提交
  5. 21 9月, 2022 2 次提交
  6. 14 9月, 2022 2 次提交
  7. 08 9月, 2022 1 次提交
    • X
      [Dy2Static] fix non-local error while dealing push_pop names (#45828) · 67d77846
      xiongkun 提交于
      * 1. fix non-local error while dealing push_pop names
      2. escape "'" in push_pop_names to avoid syntax errors.
      3. unified the non-local stmt creation processes in getter and setter.
      4. split the nonlocal_names and getter/setter names.
      
      * fix bugs
      
      * 1. revert setter and getter, push_pop_names must have non-local
      
      * fix bugs.
      
      * code format
      67d77846
  8. 06 9月, 2022 1 次提交
  9. 02 9月, 2022 1 次提交
    • X
      [ Dy2Static ] transfer list into tensor array at runtime. (#45594) · 3be7f495
      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
      3be7f495
  10. 26 8月, 2022 1 次提交
    • X
      [ Dy2static ] select input fix and while_op memory bug fixed. (#45380) · 91298884
      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
      91298884
  11. 19 8月, 2022 1 次提交
  12. 12 7月, 2022 1 次提交
    • X
      [ Dy2Static ]Change NameVisitor in while to FunctionScopeAnalysis (#44155) · c5c6026e
      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
      c5c6026e
  13. 08 7月, 2022 1 次提交
  14. 06 7月, 2022 1 次提交
    • X
      [Dy2static] FunctionScopeVisitor Enhance and substitute the original NameVisitor in If (#43967) · b603dd55
      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
      b603dd55
  15. 05 7月, 2022 1 次提交
  16. 01 7月, 2022 1 次提交
  17. 30 6月, 2022 1 次提交
  18. 28 6月, 2022 1 次提交
  19. 23 6月, 2022 1 次提交
  20. 13 6月, 2022 1 次提交
  21. 05 6月, 2022 1 次提交
    • S
      【code format check upgrade】 step2:yapf (#42944) · a072fca8
      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
      a072fca8
  22. 27 5月, 2022 1 次提交
  23. 09 3月, 2022 1 次提交
  24. 24 1月, 2022 1 次提交
  25. 10 12月, 2021 1 次提交
  26. 19 11月, 2021 1 次提交
  27. 03 11月, 2021 1 次提交
    • 0
      [Dy2stat]support Python3 type annotation (#36544) · db8425ec
      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>
      db8425ec
  28. 05 8月, 2021 1 次提交
  29. 24 6月, 2021 1 次提交
  30. 21 6月, 2021 1 次提交
  31. 17 6月, 2021 1 次提交
  32. 09 4月, 2021 1 次提交
  33. 24 3月, 2021 1 次提交
  34. 04 3月, 2021 1 次提交
  35. 18 2月, 2021 1 次提交
    • H
      Add Support for Tuple in for Loop (#30998) · c1375783
      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]
      c1375783
  36. 20 1月, 2021 1 次提交
  37. 14 1月, 2021 1 次提交
  38. 18 12月, 2020 1 次提交