1. 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
  2. 28 10月, 2021 1 次提交
  3. 27 10月, 2021 1 次提交
  4. 20 10月, 2021 1 次提交
  5. 19 10月, 2021 1 次提交
  6. 12 10月, 2021 1 次提交
  7. 16 9月, 2021 1 次提交
  8. 14 9月, 2021 1 次提交
  9. 03 9月, 2021 1 次提交
  10. 01 9月, 2021 2 次提交
  11. 05 8月, 2021 2 次提交
  12. 28 7月, 2021 1 次提交
  13. 27 7月, 2021 1 次提交
  14. 23 7月, 2021 1 次提交
  15. 22 7月, 2021 1 次提交
  16. 20 7月, 2021 1 次提交
  17. 15 7月, 2021 1 次提交
  18. 14 7月, 2021 1 次提交
  19. 05 7月, 2021 1 次提交
  20. 30 6月, 2021 1 次提交
  21. 24 6月, 2021 1 次提交
  22. 21 6月, 2021 1 次提交
  23. 17 6月, 2021 1 次提交
  24. 16 6月, 2021 1 次提交
  25. 09 6月, 2021 2 次提交
  26. 08 6月, 2021 1 次提交
  27. 04 6月, 2021 1 次提交
    • H
      [Dy2stat] Add Support for paddle.grad (#33110) · 82630f38
      Huihuang Zheng 提交于
      This PR made these changes to support double grad:
      
      1. Translate `paddle.grad` to `paddle.static.gradients` to support double grad for dy2stat.
      2. Fix IfElseTransformer bug which may not change value if "Store before Load" variable is in "Store" statement is in IfElse conditional statement
      3. Add `DOut` to support double grad variables in `run_program_op`
      4. Add support for renaming for double grads for `jit.save/load`
      82630f38
  28. 20 5月, 2021 1 次提交
  29. 19 5月, 2021 1 次提交
  30. 30 4月, 2021 1 次提交
    • H
      [Dy2stat] Fix to_tensor Bug Reported from QA (#32701) · 00268194
      Huihuang Zheng 提交于
      Dy2stat failed when user writes return paddle.to_tensor(xxx), the reason is that visit_Expr doesn't work when the Expr is in return. Some other statements may trigger same bug. To fix it, we re-wrote a transformer to transform paddle.to_tensor to paddle.assign for all Call nodes.
      00268194
  31. 09 4月, 2021 2 次提交
  32. 24 3月, 2021 1 次提交
  33. 11 3月, 2021 1 次提交
  34. 04 3月, 2021 3 次提交
    • L
      522c91ec
    • H
      Fix comment (#31424) · c40b98e0
      Huihuang Zheng 提交于
      Fix wrong code comment
      c40b98e0
    • H
      [Dy2stat] Fix Read-Only Attribute as while_loop Output (#31415) · 6bf02a12
      Huihuang Zheng 提交于
      Fix Read-Only Attribute as while_loop Output:
      
      Usually, our convert_while_loop will be like:
      ```
          [a, b, c] = paddle.jit.dy2static.convert_while_loop(
                  condition_name, body_name, [a, b, c])
      ```
      where a, b, c are in loop_var_names.
      
      However, if loop_var_names contains property such as foo.x, we cannot
      assign the attribute as output of convert_while_loop because Python
      property is a kind of read-only attribute. To handle the case, we replace
      the attributes which are output of convert_while_loop with generated
      variables, then if we know the attribute is not read-only at runtime, we
      assign the attribute. The created statements are like:
      ```
          [a, b, __attribute_variable_1] = paddle.jit.dy2static.convert_while_loop(
                  condition_name, body_name, [a, b, foo.x])
          if not isinstance(getattr(type(foo), x, None), property): foo.x = __attribute_variable_1
      ```
      6bf02a12