-
Notifications
You must be signed in to change notification settings - Fork 194
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 MaskedL2NN #838
Add MaskedL2NN #838
Conversation
cfee44d
to
90abf67
Compare
@ahendriksen, it's getting very close to burndown for 22.12. Mind if we bump this forward to 23.02? Do you think you might have something working by then? |
Yes that is okay.
…On Wed, Nov 9, 2022, at 9:00 PM, Corey J. Nolet wrote:
@ahendriksen <https://github.com/ahendriksen> mind if we bump this forward to 23.02? Do you think you might have something working by then?
—
Reply to this email directly, view it on GitHub <#838 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA72YFTLXXO3A5U7QTFWVTDWHP7FBANCNFSM6AAAAAAQTBOGFU>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hey @ahendriksen, we are still really excited about this feature. I was looking through your changes a bit mostly to see where we are with it. I have a few review items but I've held off from submitting the review until you feel this is in a good place to do so.
This won't be easy to do in an algorithm like HDBSCAN without modifying the user's input data, though I understand the importance of memory co-location like coalescing the reads. The pattern that this PR solves pops up quite a bit, though. Do you know the expected perf hit from not co-locating the data points w/ the groups? Is it pretty much all from coalescing? |
Hi @cjnolet, Feel free to add your comments!
Coalescing is absolutely necessary.
There will be a cut off point before which it does not make sense to sort the inputs. However, since the number of distance calculations scales quadratically with the number of input points, sorting will be worth it especially for medium to large data sizes. As you suggest, the sorting may even be done in place and reverted after the sparseL2NN call (rather than allocating a separate buffer with sorted inputs). |
90abf67
to
efa8056
Compare
efa8056
to
6cdcb98
Compare
Please use GitHub's Draft PR feature instead of Some useful information about Draft PRs:
|
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.
Thanks Allard for addressing the issues! The PR looks good to me!
@ahendriksen , the PR looks great. I have one additional ask, though. Can you create Github issues for these remaining items just so it stays on our radar?
|
@ahendriksen one thing that I've noticed is that this PR and #837 both seem to be consistently timing out in CI while there are some other PRs that don't seem to be timing out. This makes me a little nervous about immediately merging these right before burndown. In case this behavior is isolated to this PR, I want to be careful not to cause issues for other PRs during this release. We still have some time before code freeze to merge these, but it would help if you are able to verify locally that the build time (and ideally memory requirement during building) doesn't seem to be drastically affected by these changes. Maybe compare the build time for your changes against |
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.
Holding off on merging right away so we can investigate the CI timeouts.
@ahendriksen can you please update this PR to accept raft::device_resources everywhere instead of raft::handle_t? |
…riksen/raft into wip-move-contractions-tiling-logic
Done. |
I have created issues: |
/merge |
This reverts commit 2fb5c06.
This PR adds the sparseL2NN functionality.
This enables faster computing pairwise distances by making use of sparsity in the problem: the computation of distances between point pairs can be skipped.
The sparsity between arrays of points X and Y is expressed as follows:
To speed up computation, the adjacency matrix is compressed into a bitfield.
To ensure competitive speeds, the caller must make sure that consecutive rows in X are adjacent to the same groups in Y (as much as possible) to enable efficient skipping in the kernel.
Some work is still TODO: