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

Support static graph code-gen for deformableConvV1 #53569

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
194 changes: 0 additions & 194 deletions paddle/fluid/operators/deformable_conv_v1_op.cc

This file was deleted.

11 changes: 0 additions & 11 deletions paddle/phi/api/yaml/legacy_backward.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -231,17 +231,6 @@
data_type: x
composite: cumsum_grad(x, out_grad, axis, flatten, exclusive, reverse, x_grad)

- backward_op : deformable_conv_grad
forward : deformable_conv(Tensor x, Tensor offset, Tensor filter, Tensor mask, int[] strides, int[] paddings, int[] dilations, int deformable_groups, int groups, int im2col_step) -> Tensor(out)
args : (Tensor x, Tensor offset, Tensor filter, Tensor mask, Tensor out_grad, int[] strides, int[] paddings, int[] dilations, int deformable_groups, int groups, int im2col_step)
output : Tensor(x_grad), Tensor(offset_grad), Tensor(filter_grad), Tensor(mask_grad)
infer_meta :
func : DeformableConvGradInferMeta
kernel :
func : deformable_conv_grad
data_type : x
optional : mask

- backward_op : depthwise_conv2d_double_grad
forward : depthwise_conv2d_grad (Tensor input, Tensor filter, Tensor grad_out, int[] strides, int[] paddings, str padding_algorithm, int groups, int[] dilations, str data_format) -> Tensor(grad_input), Tensor(grad_filter)
args : (Tensor input, Tensor filter, Tensor grad_out, Tensor grad_input_grad, Tensor grad_filter_grad, int[] strides, int[] paddings, str padding_algorithm, int groups, int[] dilations, str data_format)
Expand Down
11 changes: 0 additions & 11 deletions paddle/phi/api/yaml/legacy_ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,17 +251,6 @@
param : [x, mode]
backend : place

- op : deformable_conv
args : (Tensor x, Tensor offset, Tensor filter, Tensor mask, int[] strides, int[] paddings, int[] dilations, int deformable_groups, int groups, int im2col_step)
output : Tensor(out)
infer_meta :
func : DeformableConvInferMeta
kernel :
func : deformable_conv
data_type : x
optional : mask
backward : deformable_conv_grad

- op : depthwise_conv2d
args : (Tensor x, Tensor filter, int[] strides, int[] paddings, str padding_algorithm, int groups, int[] dilations, str data_format)
output : Tensor(out)
Expand Down
7 changes: 7 additions & 0 deletions paddle/phi/api/yaml/op_compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,13 @@
outputs :
out : Output

- op : deformable_conv_v1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deformable_conv_v1->deformable_conv(deformable_conv_v1)
deformable_conv_v1_grad->deformable_conv_grad(deformable_conv_v1_grad)

backward : deformable_conv_v1_grad
inputs :
{x : Input, offset : Offset, filter : Filter}
outputs :
out : Output

- op : depthwise_conv2d
backward : depthwise_conv2d_grad
extra :
Expand Down
10 changes: 10 additions & 0 deletions paddle/phi/api/yaml/static_backward.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@
func : deformable_conv_grad
data_type : x

- backward_op : deformable_conv_v1_grad
forward : deformable_conv_v1 (Tensor x, Tensor offset, Tensor filter, int[] strides={1, 1}, int[] paddings={0, 0}, int[] dilations={1, 1}, int deformable_groups=1, int groups=1, int im2col_step=64) -> Tensor(out)
args : (Tensor x, Tensor offset, Tensor filter,Tensor out_grad, int[] strides, int[] paddings, int[] dilations, int deformable_groups, int groups, int im2col_step)
output : Tensor(x_grad), Tensor(offset_grad), Tensor(filter_grad)
infer_meta :
func : DeformableConvGradInferMeta
kernel :
func : deformable_conv_v1_grad
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deformable_conv_v1_grad->deformable_conv_grad

data_type : x

- backward_op : embedding_grad
forward : embedding (Tensor x, Tensor weight, int64_t padding_idx=-1) -> Tensor(out)
args : (Tensor x, Tensor weight, Tensor out_grad, int64_t padding_idx=-1)
Expand Down
10 changes: 10 additions & 0 deletions paddle/phi/api/yaml/static_ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@
data_type : x
backward : deformable_conv_grad

- op : deformable_conv_v1
args : (Tensor x, Tensor offset, Tensor filter, int[] strides={1, 1}, int[] paddings={0, 0}, int[] dilations={1, 1}, int deformable_groups=1, int groups=1, int im2col_step=64)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对应的配置到ops.yaml中和backward中

output : Tensor(out)
infer_meta :
func : DeformableConvInferMeta
kernel :
func : deformable_conv_v1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deformable_conv_v1->deformable_conv

data_type : x
backward : deformable_conv_v1_grad

- op : embedding
args : (Tensor x, Tensor weight, int64_t padding_idx=-1)
output : Tensor
Expand Down
54 changes: 0 additions & 54 deletions paddle/phi/ops/compat/deformable_conv_sig.cc

This file was deleted.