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

add autogen code support for sigmoid_cross_entropy_with_logits #52263

Merged
Show file tree
Hide file tree
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
190 changes: 0 additions & 190 deletions paddle/fluid/operators/sigmoid_cross_entropy_with_logits_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 @@ -1344,6 +1344,17 @@
func : send_uv_grad
data_type : x

- backward_op : sigmoid_cross_entropy_with_logits_grad
forward : sigmoid_cross_entropy_with_logits (Tensor x, Tensor label, bool normalize=false, int ignore_index=-100) -> Tensor(out)
args : (Tensor x, Tensor label, Tensor out_grad, bool normalize, int ignore_index)
output : Tensor(x_grad)
infer_meta :
func : UnchangedInferMeta
param : [x]
kernel :
func : sigmoid_cross_entropy_with_logits_grad
inplace : (out_grad -> x_grad)

- backward_op : sigmoid_double_grad
forward : sigmoid_grad (Tensor out, Tensor fwd_grad_out) -> Tensor(grad_x)
args : (Tensor out, Tensor fwd_grad_out, Tensor grad_x_grad)
Expand Down
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 @@ -1045,17 +1045,6 @@
data_type : x
optional : summed_ids

- backward_op : sigmoid_cross_entropy_with_logits_grad
forward : sigmoid_cross_entropy_with_logits (Tensor x, Tensor label, bool normalize, int ignore_index) -> Tensor(out)
args : (Tensor x, Tensor label, Tensor out_grad, bool normalize, int ignore_index)
output : Tensor(x_grad)
infer_meta :
func : UnchangedInferMeta
param : [x]
kernel :
func : sigmoid_cross_entropy_with_logits_grad
inplace : (out_grad -> x_grad)

- backward_op : slice_double_grad
forward : slice_grad (Tensor input, Tensor grad_out, int64_t[] axes, IntArray starts, IntArray ends, int64_t[] infer_flags, int64_t[] decrease_axis) -> Tensor(grad_input)
args : (Tensor grad_input_grad, int64_t[] axes, IntArray starts, IntArray ends, int64_t[] infer_flags, int64_t[] decrease_axis)
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 @@ -1417,15 +1417,6 @@
data_transform:
skip_transform : input

- op : sigmoid_cross_entropy_with_logits
args : (Tensor x, Tensor label, bool normalize, int ignore_index)
output : Tensor
infer_meta :
func : SigmoidCrossEntropyWithLogitsInferMeta
kernel :
func : sigmoid_cross_entropy_with_logits
backward : sigmoid_cross_entropy_with_logits_grad

- op : slice
args : (Tensor input, int64_t[] axes, IntArray starts, IntArray ends, int64_t[] infer_flags, int64_t[] decrease_axis)
output : Tensor
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 @@ -1994,3 +1994,10 @@
backward : while_grad
extra :
attrs : ['str[] skip_eager_deletion_vars = {}']

- op: sigmoid_cross_entropy_with_logits
backward: sigmoid_cross_entropy_with_logits_grad
inputs :
{x: X, label: Label}
outputs :
out : Out
9 changes: 9 additions & 0 deletions paddle/phi/api/yaml/ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1367,6 +1367,15 @@
inplace : (x -> out)
backward : sigmoid_grad

- op : sigmoid_cross_entropy_with_logits
args : (Tensor x, Tensor label, bool normalize=false, int ignore_index=-100)
output : Tensor
infer_meta :
func : SigmoidCrossEntropyWithLogitsInferMeta
kernel :
func : sigmoid_cross_entropy_with_logits
backward : sigmoid_cross_entropy_with_logits_grad
gouzil marked this conversation as resolved.
Show resolved Hide resolved

- op : sign
args : (Tensor x)
output : Tensor(out)
Expand Down
31 changes: 0 additions & 31 deletions paddle/phi/ops/compat/sigmoid_cross_entropy_with_logits_sig.cc

This file was deleted.