-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[CodeCamp #18] add ops bbox_overlaps #2477
Conversation
Since we already have a pure PyTorch implementation, could you provide a benchmark for the speed-up of the new op? |
|
||
void bbox_overlaps_cpu(const Tensor boxes1, const Tensor boxes2, Tensor ious, | ||
const int mode, const bool aligned, const int offset) { | ||
bbox_overlaps_cpu_kernel<float>(boxes1, boxes2, ious, mode, aligned, offset); |
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.
Assert the input and output datatype here.
The data size in the unit test is relatively small. Have you benchmark it on large datas (1000+ boxes)? |
As you say,Pytorch optimizes large amounts of data far more efficiently than C++ loops
elapsed time
So in practice, the pytorch version may indeed be more efficient |
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
* add ops bbox_overlaps * format code * Return the pytorch version * Intermediate modification * Solve problems in parameter passing * revise bug * "add test case"
* add ops bbox_overlaps * format code * Return the pytorch version * Intermediate modification * Solve problems in parameter passing * revise bug * "add test case"
* add ops bbox_overlaps * format code * Return the pytorch version * Intermediate modification * Solve problems in parameter passing * revise bug * "add test case"
* add ops bbox_overlaps * format code * Return the pytorch version * Intermediate modification * Solve problems in parameter passing * revise bug * "add test case"
* add ops bbox_overlaps * format code * Return the pytorch version * Intermediate modification * Solve problems in parameter passing * revise bug * "add test case"
* add ops bbox_overlaps * format code * Return the pytorch version * Intermediate modification * Solve problems in parameter passing * revise bug * "add test case"
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
Add CPU implementation of ops
bbox_overlaps
cpu version
pure python version
Modification
Please briefly describe what modification is made in this PR.
BC-breaking (Optional)
No
Use cases (Optional)
passed
tests/test_ops/test_bbox.py
Checklist
Before PR:
After PR: