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 temporal_shift #52686

Merged
merged 6 commits into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
164 changes: 0 additions & 164 deletions paddle/fluid/operators/temporal_shift_op.cc

This file was deleted.

11 changes: 11 additions & 0 deletions paddle/phi/api/yaml/backward.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1761,6 +1761,17 @@
inplace : (grad_x_grad_forward -> grad_out_forward_grad)
optional : grad_out_new_grad, grad_out_grad_grad

- backward_op : temporal_shift_grad
forward : temporal_shift(Tensor x, int seg_num, float shift_ratio = 0.25f, str data_format = "NCHW") -> Tensor(out)
args : (Tensor out_grad, int seg_num, float shift_ratio, str data_format)
output : Tensor(x_grad)
infer_meta :
func : UnchangedInferMeta
param : [out_grad]
kernel :
func : temporal_shift_grad
data_type : out_grad

- backward_op : thresholded_relu_grad
forward : thresholded_relu (Tensor x, float threshold) -> Tensor(out)
args : (Tensor x, Tensor out_grad, float threshold)
Expand Down
10 changes: 0 additions & 10 deletions paddle/phi/api/yaml/legacy_backward.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1138,16 +1138,6 @@
data_type : out_grad
optional : reserve_space

- backward_op : temporal_shift_grad
forward : temporal_shift(Tensor x, int seg_num, float shift_ratio, str data_format_str) -> Tensor(out)
args : (Tensor out_grad, int seg_num, float shift_ratio, str data_format_str)
output : Tensor(x_grad)
infer_meta :
func : UnchangedInferMeta
param : [out_grad]
kernel :
func : temporal_shift_grad

- backward_op : tile_double_grad
forward : tile_grad (Tensor x, Tensor grad_out, IntArray repeat_times) -> Tensor(grad_x)
args : (Tensor grad_x_grad, IntArray repeat_times)
Expand Down
9 changes: 0 additions & 9 deletions paddle/phi/api/yaml/legacy_ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1402,15 +1402,6 @@
backward : sync_batch_norm_grad
inplace : (mean -> mean_out), (variance -> variance_out)

- op : temporal_shift
args : (Tensor x, int seg_num, float shift_ratio, str data_format_str)
output : Tensor
infer_meta :
func : TemporalShiftInferMeta
kernel :
func : temporal_shift
backward : temporal_shift_grad

- op : tile
args : (Tensor x, IntArray repeat_times = {})
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 @@ -2222,3 +2222,10 @@
{x: X, label: Label}
outputs :
out : Out

- op: temporal_shift
backward: temporal_shift_grad
inputs :
x : X
outputs :
out : Out
10 changes: 10 additions & 0 deletions paddle/phi/api/yaml/ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1704,6 +1704,16 @@
func : tanh_shrink
backward : tanh_shrink_grad

- op : temporal_shift
args : (Tensor x, int seg_num, float shift_ratio = 0.25f, str data_format = "NCHW")
output : Tensor(out)
infer_meta :
func : TemporalShiftInferMeta
kernel :
func : temporal_shift
data_type : x
backward : temporal_shift_grad

- op : thresholded_relu
args : (Tensor x, float threshold = 1.0)
output : Tensor
Expand Down
39 changes: 0 additions & 39 deletions paddle/phi/ops/compat/temporal_shift_sig.cc

This file was deleted.