1. 10 2月, 2022 1 次提交
  2. 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
  3. 05 8月, 2021 1 次提交
  4. 19 5月, 2021 1 次提交
  5. 14 5月, 2020 1 次提交
  6. 13 5月, 2020 1 次提交
  7. 27 4月, 2020 1 次提交
    • C
      [dy2static] Add print transformer and unify print format (#24068) · 9b851ba2
      Chen Weihang 提交于
      * add print transformer & unify print format, test=develop
      
      * remove using of dygraph_to_static_func, test=develop
      
      * remove python stdout capture, test=develop
      
      * fix compatibility problems for PY2, test=develop
      
      * fix detail error, test=develop
      
      * fix type analysis bug, test=develop
      
      * fix print tuple compatible error in PY2, test=develop
      
      * replace get_func to declarative, test=develop
      
      * fix detail bug, test=develop
      
      * fix some detail problems, test=develop
      
      * change visit_call in print transformer, test=develop
      9b851ba2
  8. 01 4月, 2020 1 次提交
    • H
      [Dy2stat] Add data_layer_not_check (#23351) · 1d4d89ba
      Huihuang Zheng 提交于
      1. Add data_layer_not_check because it is needed in dygraph_to_static where input can be variable size
      2. Remove warnings in static analysis because python cannot do exact static analysis
      1d4d89ba
  9. 31 3月, 2020 1 次提交
  10. 17 3月, 2020 1 次提交
  11. 11 3月, 2020 1 次提交
  12. 27 2月, 2020 1 次提交
  13. 26 2月, 2020 1 次提交
    • H
      Add Basic Function Return Type Analysis (#22747) · 66991218
      Huihuang Zheng 提交于
      1. Considering functions, I have to change the node type from single value to a set. Because python function is allowed to return different types. The set represent all possible types
      
      2. I added scope_name and scope_type for AstVarScope, because in python functions, variable may have different scope. For example:
      
      ```
      a = 3
      def foo(b):
          a = 9
          return a + b
      ```
      
      the `a` in `foo` is different to the `a` out of `foo`. Similar to class field. The scope_name will help me to know the function name when static analysis finds a `return` sentence.
      66991218
  14. 24 2月, 2020 1 次提交
  15. 20 2月, 2020 1 次提交