Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Hackathon 5th No.31】为 Paddle 新增 column_stack / row_stack / dstack / hstack / vstack API -part #59127

Merged
merged 20 commits into from
Dec 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Change] ir_backward
  • Loading branch information
megemini committed Nov 23, 2023
commit b8f6da9401ab8bf755b26e0381f5cfdb80671f8c
18 changes: 9 additions & 9 deletions test/legacy_test/test_stack_extension_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ def _test_static_api(
out.stop_gradient = False
y = out * 123

# if paddle.framework.in_pir_mode():
# grads = paddle.autograd.ir_backward.grad(y, [out])
# out_grad = grads[0]
# else:
# paddle.static.append_backward(y)
# out_grad = out.grad_name

paddle.static.append_backward(y)
out_grad = out.grad_name
if paddle.framework.in_pir_mode():
grads = paddle.autograd.ir_backward.grad(y, [out])
out_grad = grads[0]
else:
paddle.static.append_backward(y)
out_grad = out.grad_name

# paddle.static.append_backward(y)
# out_grad = out.grad_name

fetch_list = [out, out_grad]

Expand Down