• Y
    feature/while_grad_op (#5554) · 18f0c40a
    Yang Yang(Tony) 提交于
    * first commit
    
    * Python API for while op
    
    * Python Unittest for simple while_op forward
    
    * fix out to be list
    
    * Fix UT
    
    * VarType
    
    * Fix several bugs
    
    * Fix bug
    
    * Fix bug
    
    * Fix Bug
    
    * Fix bug
    
    * Fix unittest
    
    * Remove debug log
    
    * Add comments
    
    * add PADDLE_ENFORCE
    
    * while_grad_op first commit
    
    * Add `BlockDescBind::FindRecursiveOrCreateVar()` and fix bugs
    
    * not sure how to setdim of while outputs
    
    * push for test
    
    * add executor vlog
    
    * fix bug of while_op cond
    
    * Several enhancement for code
    
    1. Backward always infer shape & infer var type. Since there are RENAME
    variables will be created when creating backward operator, but their
    shape & var types are not inferenced.
    2. Never use SomePtr-> directly, since every pointer could be nullptr if
    it is a function return value. Add `detail::Ref` to cast pointer to
    reference safely.
    3. Enhance error message for backward.
    4. Infer data type of variable in `sum` and `tensor_write`
    
    * Fix bugs of while_op gradient
    
    * Fix several bugs of while_op grad
    
    * fix fill zeros like
    
    * fix 3 >= 3
    
    * fix place holder shouldn't be null
    
    * fail on sum op
    
    * Fix SumOp of TensorList
    
    * clean up
    
    * pass while test
    
    * fix test_array_write_read
    
    * pass sum op
    
    * Support int/int64 for fill_constant_batch_size_like
    
    * Fix compile
    18f0c40a
test_while_op.py 2.4 KB