Skip to content

Commit

Permalink
Grad (#58116)
Browse files Browse the repository at this point in the history
* tmp

* [PIR]Migrate maximum into pir

* Polish code

* add ir_grad of static_gradient

* add test

* modify bug

* modify

* add mean fill_constant test

* modify cpu int32 test

* get_shape_tensor

* delete

* add default place

* modify grad

---------

Co-authored-by: 0x45f <[email protected]>
  • Loading branch information
xiaoguoguo626807 and 0x45f authored Oct 17, 2023
1 parent 7f3b4e5 commit fb0f9c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/paddle/autograd/ir_backward.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ def make_output_grad(op):
for i, value in enumerate(op.results()):
if (
value in state.value_to_valuegrad
and len(state.value_to_valuegrad[value])
) > 1:
and len(state.value_to_valuegrad[value]) > 1
):
# one value is input of more than one fwd_op,
# so more than one bwd_op create input_grad,
# need add sum op to accumulate gradient
Expand Down

0 comments on commit fb0f9c5

Please sign in to comment.