-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 code generation for op multiclass_nms3 #54272
Support code generation for op multiclass_nms3 #54272
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前看PR没什么问题,py3的CI失败在编译blas库,可以尝试rerun
…togen_multiclass_nms3
…i/Paddle into autogen_multiclass_nms3
# Get return type list & outputs | ||
returns_type_list = ["" for i in range(num_outputs)] | ||
returns_list = ["" for i in range(num_outputs)] | ||
num_visited_intermediate_outputs = 0 | ||
for name, (rtype, pos) in forward_outputs_position_map.items(): | ||
if name in intermediate_outputs: | ||
num_visited_intermediate_outputs += 1 | ||
continue | ||
pos -= num_visited_intermediate_outputs | ||
returns_list[pos] = f"{name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上面的问题是因为 eager_gen.py
在解析返回值列表的代码中,没有考虑到 intermediate
类型的 output 不在 outputs List 最后的情况,已修复
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
将 index 的 intermediate 移除后,这段改动还需要吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
将 index 的 intermediate 移除后,这段改动还需要吗?
目前就先将index
的intermediate
去除。这里的改动先保留,确实存在逻辑问题。
…i/Paddle into autogen_multiclass_nms3
class MultiClassNMS2OpMaker : public MultiClassNMSOpMaker {
public:
void Make() override {
MultiClassNMSOpMaker::Make();
AddOutput("Index",
"(phi::DenseTensor) A 2-D phi::DenseTensor with shape [No, 1] "
"represents the "
"index of selected bbox. The index is the absolute index cross "
"batches.")
.AsIntermediate();
}
};
output, index, nms_rois_num = _C_ops.multiclass_nms3(
bboxes, scores, rois_num, *attrs
) 然后跑单测会出现下面的错误:
|
@heavyrain-lzy,帮忙 Review 一下~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@luotao1,帮忙豁免一下 CI ~ |
PR types
Others
PR changes
Others
Description