-
Notifications
You must be signed in to change notification settings - Fork 197
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 public enum for select-k algorithm selection #2046
Conversation
Add an enum that controls with select-k algorithm is used. This takes the enum that was in the raft_internal and expose in the public api. This lets users pick which select algorithm they want to use directly
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
By adding all of the remaining different select-k variants to the matrix::select_k instantiations, this increases the libraft.so binary size from 425MB to 429MB (cuda11 x86_64). I think this is probably acceptable, given the alternative would be much more complex - @cjnolet @tfeher what are your thoughts here? |
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.
Wow, it's crazy how big the diff got for such a small change to the API.
The new enumeration uses its own vocabularu, which is not going to be immediately obvious to anyone outside of the RAFT development team so we should briefly summarize.
Otherwise, it all looks great to me!
@@ -76,6 +77,8 @@ namespace raft::matrix { | |||
* whether to select k smallest (true) or largest (false) keys. | |||
* @param[in] sorted | |||
* whether to make sure selected pairs are sorted by value | |||
* @param[in] algo | |||
* the selection algorithm to use |
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.
Can we expand the algorithms here a bit to give a brief summary of what they mean? I expect this API to be used mostly by power users, but I can't imagine even power users (outside of RAFT immediate developers) would be able to use these options without a brief description and summary of why each might be used. It's also a great opportunity to add the "see also" for the air-top-k paper.
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. Thanks Ben!
/merge |
Add an enum that controls which select-k algorithm is used. This takes the enum that was in the raft_internal and exposes in the public api. This lets users pick which select algorithm they want to use directly Authors: - Ben Frederickson (https://github.com/benfred) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: rapidsai#2046
Add an enum that controls which select-k algorithm is used. This takes the enum that was in the raft_internal and exposes in the public api. This lets users pick which select algorithm they want to use directly