[Dy2stat] Add Support for paddle.grad (#33110)
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`
Showing
想要评论请 注册 或 登录