-
Notifications
You must be signed in to change notification settings - Fork 145
Convert non-type template parameters to runtime parameters in CAGRA search to cut binary size #1498
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
Open
seunghwak
wants to merge
31
commits into
rapidsai:main
Choose a base branch
from
seunghwak:enh_search_core
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
0e9f61c
covnert max_topk to a runtime parameter
seunghwak 444b946
convert max_candidates to a runtime parameter
seunghwak 54a1805
convert max_elements to a runtime parameter
seunghwak 6fc87a2
Merge branch 'main' of https://github.com/rapidsai/cuvs into enh_sear…
seunghwak 25a0b8d
Merge branch 'main' of https://github.com/rapidsai/cuvs into enh_sear…
seunghwak a13112f
Merge branch 'main' of https://github.com/rapidsai/cuvs into enh_sear…
seunghwak aa5c116
tighter bound on array size
seunghwak 178459a
undo most of the changes in bitonic.hpp except for the less unrolling…
seunghwak 6aae61d
remove __inline__ from topk_by_radix (to lower register pressure)
seunghwak 8aaf11b
branch outside topk_by_bitonic_sort
seunghwak 0735129
use shared memory when I need to create large stack arrays for bitoni…
seunghwak 3c9ee5f
branch before calling topky_by_bitonic_sort_and_merge
seunghwak 68b191b
undo changes in topk_cta_11_core (branch in the caller site)
seunghwak 89d9698
fix build error
seunghwak a9bfab7
update max_itopk setting in single-CTA radix sort based search to mat…
seunghwak a0be265
create non-template wrapper functions to prevent high register pressu…
seunghwak 52141c3
remove unnecessary include statements
seunghwak 15bdc84
use smem to reduce register pressure
seunghwak c41d548
Merge branch 'main' of https://github.com/rapidsai/cuvs into enh_sear…
seunghwak 2a8eac0
Merge branch 'main' of https://github.com/rapidsai/cuvs into enh_sear…
seunghwak 5a117a5
fix build error after pulling new updates
seunghwak 4cd6f8f
undo using shared memory to store key, value pairs
seunghwak c8a9673
delete dead code
seunghwak 77d657c
fix an error
seunghwak efcf489
tweak register pressure
seunghwak 55b80f4
Merge branch 'main' of https://github.com/rapidsai/cuvs into enh_sear…
seunghwak bde5ac5
copyright year
seunghwak 49c1c64
Merge branch 'main' of https://github.com/rapidsai/cuvs into enh_sear…
seunghwak 901bad6
undo conditional unrolling in bitonic.hpp (this significantly slows d…
seunghwak 4f7ef48
final performance tweak
seunghwak a596c9f
Merge branch 'main' of https://github.com/rapidsai/cuvs into enh_sear…
seunghwak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
This change effectively removes all of the loop unrolling, because
nis not known at compile time (you can safely remove#pragra unrollas it does nothing now btw). In particular, this means the input arrayskandvcannot be passed and accessed via registers. This will likely have a huge impact on performance.Please run a few benchmarks using ANN_BENCH first to see the impact on the throughput. From there, we can decide whether (a) performance is acceptable, (b) we need to profile the the kernel using NCU and try to improve performance, or (c) the perf state is hopeless and cannot be recovered without manual loop unrolling / restoring the template parameter.
For the benchmarks, I'd suggest the following parameter sweep: