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 CUDA code for sort_vertices. #619

Merged
merged 6 commits into from
Jul 27, 2021
Merged

Add CUDA code for sort_vertices. #619

merged 6 commits into from
Jul 27, 2021

Conversation

dfalbel
Copy link
Member

@dfalbel dfalbel commented Jul 23, 2021

This PR adds changes to lantern so we can add custom CUDA code.
We added the code from https://github.com/lilanxiao/Rotated_IoU use to efficiently sort vertices.

This will eventually fix #608

TODO:

  • Create the Rcpp wrapper around the lantern call.
  • Deal with the case when lantern is not built with cuda support. Ie, we need to provide an implementation of sort_vertices that works in that case.
  • Add comments attributing to the original repository + license.

@dfalbel dfalbel added the lantern Use this label if your PR affects lantern so it's built in the CI label Jul 23, 2021
@dfalbel dfalbel merged commit 38e5547 into master Jul 27, 2021
@dfalbel dfalbel deleted the contrib/sort-vertices branch July 27, 2021 13:03
@dominikj2
Copy link

Hi @dfalbel,

Thank you for PR that adds changes to lantern so we can add custom CUDA code.

Reinstalled torch and found torch::contrib_sort_vertices() . Thank you!

@dfalbel
Copy link
Member Author

dfalbel commented Jul 29, 2021

@dominikj2 Glad it worked! Let me know if you have any problems. It would be nice if at some point we provided a cpu implementation for contrib_sort_vertices(). Currently it will only work if all inputs are on the GPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lantern Use this label if your PR affects lantern so it's built in the CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Making custom CUDA function for R torch
2 participants