Skip to content

Commit

Permalink
support auto generate for nms (#51891)
Browse files Browse the repository at this point in the history
  • Loading branch information
enkilee authored Mar 23, 2023
1 parent 5bcdfbb commit 4bf1c16
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 106 deletions.
1 change: 0 additions & 1 deletion paddle/fluid/operators/detection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ detection_library(sigmoid_focal_loss_op SRCS sigmoid_focal_loss_op.cc
sigmoid_focal_loss_op.cu)
detection_library(retinanet_detection_output_op SRCS
retinanet_detection_output_op.cc)
detection_library(nms_op SRCS nms_op.cc)

if(WITH_GPU OR WITH_ROCM)
set(TMPDEPS memory)
Expand Down
96 changes: 0 additions & 96 deletions paddle/fluid/operators/detection/nms_op.cc

This file was deleted.

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 @@ -1168,15 +1168,6 @@
inplace : (x -> out)
backward : multiply_grad

- op : nms
args : (Tensor x, float threshold)
output : Tensor(out)
infer_meta :
func : NMSInferMeta
kernel :
func : nms
data_type : x

- op : norm
args : (Tensor x, int axis, float epsilon, bool is_test)
output : Tensor(out), Tensor(norm)
Expand Down
8 changes: 8 additions & 0 deletions paddle/phi/api/yaml/op_compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,14 @@
outputs :
{out : Out, total_weight : Total_weight}

- op : nms
inputs :
x : Boxes
outputs :
out : KeepBoxesIdxs
attrs :
threshold : iou_threshold

- op : nonzero (where_index)
inputs :
condition : Condition
Expand Down
9 changes: 9 additions & 0 deletions paddle/phi/api/yaml/ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,15 @@
optional : weight
backward : nll_loss_grad

- op : nms
args : (Tensor x, float threshold = 1.0f)
output : Tensor(out)
infer_meta :
func : NMSInferMeta
kernel :
func : nms
data_type : x

- op : nonzero
args : (Tensor condition)
output : Tensor(out)
Expand Down

0 comments on commit 4bf1c16

Please sign in to comment.