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

[Prim][PIR] Add the dynamic shape test case for scale_grad, square_grad, transpose_grad and swiglu_grad #67590

Merged
merged 4 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
58 changes: 31 additions & 27 deletions python/paddle/autograd/backward_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,45 +30,49 @@
# TODO(CZ): to be removed when we support dynamic shape by default.
ALLOW_DYNAMIC_SHAPE_VJP_OPS = [
"pd_op.abs",
"pd_op.add",
"pd_op.assign",
"pd_op.sin",
"pd_op.cos",
"pd_op.tanh",
"pd_op.cast",
"pd_op.log",
"pd_op.exp",
"pd_op.sqrt",
"pd_op.rsqrt",
"pd_op.sigmoid",
"pd_op.silu",
"pd_op.sum",
"pd_op.mean",
"pd_op.add",
"pd_op.subtract",
"pd_op.concat",
"pd_op.split",
"pd_op.multiply",
"pd_op.relu",
"pd_op.cos",
"pd_op.cumsum",
"pd_op.divide",
"pd_op.pow",
"pd_op.elementwise_pow",
"pd_op.softmax",
"pd_op.matmul",
"pd_op.cumsum",
"pd_op.erf",
"pd_op.exp",
"pd_op.expand",
"pd_op.floor",
"pd_op.reshape",
"pd_op.gelu",
"pd_op.hardswish",
"pd_op.leaky_relu",
"pd_op.softsign",
"pd_op.log",
"pd_op.matmul",
"pd_op.max",
"pd_op.maximum",
"pd_op.mean",
"pd_op.minimum",
"pd_op.gelu",
"pd_op.hardswish",
"pd_op.multiply",
"pd_op.pad",
"pd_op.pow",
"pd_op.reduce_as",
"pd_op.max",
"pd_op.relu",
"pd_op.reshape",
"pd_op.rsqrt",
"pd_op.scale",
"pd_op.sigmoid",
"pd_op.silu",
"pd_op.sin",
"pd_op.subtract",
"pd_op.sum",
"pd_op.softmax",
"pd_op.softsign",
"pd_op.split",
"pd_op.sqrt",
"pd_op.square",
"pd_op.stack",
"pd_op.expand",
"pd_op.pad",
"pd_op.swiglu",
"pd_op.transpose",
"pd_op.tanh",
]


Expand Down
4 changes: 4 additions & 0 deletions test/prim/pir_prim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ set(TEST_PRIM_PURE_PIR_CASES
test_auto_recompute_dy2static
test_prim_sub_graph_dynamic_shape
test_prim_sub_graph_backward_dynamic_shape
test_prim_sub_graph_abcde_backward_dynamic_shape
test_prim_sub_graph_fghij_backward_dynamic_shape
test_prim_sub_graph_klmno_backward_dynamic_shape
test_prim_sub_graph_pqrst_backward_dynamic_shape
test_decompose_control_flow
test_decomp_whole_program
test_dynamic_combine1
Expand Down
Loading