-
Notifications
You must be signed in to change notification settings - Fork 566
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
[REVIEW] Simplify tSNE perplexity search #2622
[REVIEW] Simplify tSNE perplexity search #2622
Conversation
e2db9ad
to
dfff625
Compare
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
ok to test |
@zbjornson, can you move the target branch to 0.16? |
dfff625
to
44a89d1
Compare
@cjnolet done! |
44a89d1
to
c26ba40
Compare
@cjnolet and/or @drobison00 could you review this when you get a chance please? I have some more tSNE fixes lined up that depend on this. I haven't made any changes to this PR since Jul, aside from rebasing it periodically. |
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.
@zbjornson, this looks great and I see a lot of potential to remove unnecessary memory reads/writes in these kernels by loading from distances once in each loop, performing the intermediate computations in registers and then making a single write to P at the very end.
I'm approving this PR. Can you fix the conflicts?
c26ba40
to
3900091
Compare
Thanks. Conflicts fixed. |
@cjnolet gentle nudge, this one's ready to merge I think! |
Just had a changelog conflict (fixed). I'll merge as soon as tests pass. Thanks! |
0ec3adb
to
7f2a0d2
Compare
Sum(P) == n. See discussion in rapidsai#1364 (comment). This is also what CannyLab's implementation does. While this removes code (including an atomic op), it somehow slightly increases runtime (~200 ms for 1M rows), but it's off the critical path.
7f2a0d2
to
b7d1702
Compare
I'll merge today - sorry about the delay, @zbjornson |
P_sum is equal to n. See rapidsai#2622 where I made this change once before. rapidsai#4208 changed it back while consolidating code.
P_sum is equal to n. See #2622 where I made this change once before. #4208 changed it back while consolidating code. Authors: - Zach Bjornson (https://github.com/zbjornson) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: #4425
P_sum is equal to n. See rapidsai#2622 where I made this change once before. rapidsai#4208 changed it back while consolidating code. Authors: - Zach Bjornson (https://github.com/zbjornson) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: rapidsai#4425
Sum(P) == n. See discussion in #1364 (comment). This is also what CannyLab's implementation does.
While this removes code (including an atomic op), it somehow slightly increases runtime (~200 ms for 1M rows), but it's off the critical path and I think worth it for the 20 fewer lines of code and more accurate value. AFAICT it's due to the change to the
sum_disti_Pi
loop insidesigmas_kernel
. (I'm inclined to guess it has to do with loop alignment, but nvcc doesn't provide a way to control that.)@drobison00