-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 thrust support for nms #5116
Conversation
@Laurawly Can we refactor |
topi/python/topi/cuda/sort.py
Outdated
The output of this function. | ||
""" | ||
if axis < 0: | ||
axis = len(data.shape) + axis |
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.
Add check for the axis. For example,
assert axis==len(data.shape)-1, "Supports sorting along the last axis only"
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.
In original sort_nms, we do support axis
other than -1, I'll add your swap operations in this operator.
@Laurawly Can we have implementation like this? Big if/else blocks should be put inside
|
Lemme know if the changes look good to you. |
Yes this looks great! Thanks |
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.
Looks good to me, thanks!
* add argsort_nms_thrust * consider valid count in thrust nms sort * make thrust optional * typo * typo * fix pylint * address some of the comments * address more comments * fix lint * address more comments * address more comments
* add argsort_nms_thrust * consider valid count in thrust nms sort * make thrust optional * typo * typo * fix pylint * address some of the comments * address more comments * fix lint * address more comments * address more comments
@kazum @masahi @icemelon9 Please feel free to raise any suggestions or comments.