1. 08 12月, 2022 1 次提交
  2. 01 12月, 2022 1 次提交
  3. 30 11月, 2022 1 次提交
  4. 29 11月, 2022 1 次提交
  5. 03 11月, 2022 1 次提交
  6. 01 11月, 2022 1 次提交
    • N
      [CodeStyle][E711] use `is`/`is not` for comparison with `None` (#47452) · a35a4a53
      Nyakku Shigure 提交于
      * [CodeStyle][E711] use `is`/`is not` for comparison with `None`
      
      * `self.assertTrue($A is None)` -> `self.assertIsNone($A)`
      
      * `self.assertTrue($A is not None)` -> `self.assertIsNotNone($A)`
      
      * `self.assertFalse($A is None)` -> `self.assertIsNotNone($A)`
      
      * `self.assertEqual($A, None)` -> `self.assertIsNone($A)`
      
      * `self.assertNotEqual($A, None)` -> `self.assertIsNotNone($A)`
      a35a4a53
  7. 23 10月, 2022 1 次提交
  8. 27 9月, 2022 1 次提交
  9. 19 9月, 2022 1 次提交
    • X
      [Dy2Static] refactor the return transformer (#45900) · 908132dd
      xiongkun 提交于
      * 1. refactor the return transformer.
      2. fix some bugs in return transformer.
      
      * support raise error while return stmt's father is For or while
      
      * fix ci error.
      
      * fix ci error and add some unittest
      
      * code format
      
      * fix ci error
      908132dd
  10. 13 9月, 2022 1 次提交
  11. 08 7月, 2022 1 次提交
  12. 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
  13. 05 7月, 2022 1 次提交
  14. 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
  15. 27 5月, 2022 1 次提交
  16. 05 8月, 2021 1 次提交
  17. 28 11月, 2020 1 次提交
  18. 30 6月, 2020 1 次提交
    • H
      [Dy2stat] Support Various-Length Return Grammar in Dy2stat (#25249) · 5e8e6dad
      Huihuang Zheng 提交于
      Support Various-Length Return Grammar in Dy2stat. This PR is a follow-up of https://github.com/PaddlePaddle/Paddle/pull/25176 .
      
      The basic idea is putting no-value placeholder variables at `return` statement to make all `return` statement have same length, after that the static graph can have fixed fetch output (code at return_transformer.py). Then remove those no-value placeholder when we finally return dygraph result (code at partial_program.py).
      
      However, various length return in Bert model is still not supported. The dy2stat can change the code as I wish but some ops which check shape at compile time (e.g. Reshape, MatMul) will throw error because of the no-value-placeholder may not have the required shape. Is this a matter? To me, those no-value placeholder will be replaced as really values meeting shape requirements at run time, so I think the solution should be some way to do the compile-time checking. By the way, every time when we have dynamic shape, it often causes problem in dy2stat. We should find a way to handle it in the future.
      
      Fixing various return in Bert is my TODO thing and I will also find some other existing models for verification.
      5e8e6dad
  19. 29 6月, 2020 1 次提交
    • H
      [Dy2stat] Add Basic Support for Grammar 'return' (#25176) · 6f631a27
      Huihuang Zheng 提交于
      This PR added basic support for 'return' grammar in dy2stat. It supports the control flow of 'return'.
      
      The basics idea is using a return value variable to store the early return statements and boolean state variables with if-else to skip the statements after the return statements.
      
      **This PR is very basic support. There are some corner cases I didn't develop/test**. For example, 'return None', 'return different length of variables', 'return non-tensor and tensor together', 'no return statement'. **These corner cases will be done in my next PRs**. Target date is this week.
      
      **Note**: 
      1. for the unit test, I changed test_program_translator.py because the StaticCode of `dyfunc_with_if_else` will change. To guarantee the correctness of `dyfunc_with_if_else`, I also run it in `TestRecursiveReturn` in test_return.py.
      
      2. I commented the early return code in bert_dygraph_model.py because 'return different length of variables' is unsupported now. I also know that there are some other models used early return and we didn't enable it in the unit test. I will add support for it in next PRs and then re-enable those tests.
      6f631a27