-
Notifications
You must be signed in to change notification settings - Fork 163
Fixes for stricter compilers #1703
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
139875b
Fixes for stricter compilers
maxwbuckley 9827f5a
Merge branch 'main' into patch-6
mythrocks ec37392
Apply suggestion from @mythrocks
mythrocks 93e453d
Merge branch 'main' into patch-6
mythrocks 8db9f00
Merge branch 'main' into patch-6
cjnolet e5263f4
Merge branch 'main' into patch-6
cjnolet 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,11 +76,11 @@ template <typename T> | |
| RAFT_DEVICE_INLINE_FUNCTION auto team_sum(T x, uint32_t team_size_bitshift) -> T | ||
| { | ||
| switch (team_size_bitshift) { | ||
| case 5: x += raft::shfl_xor(x, 16); | ||
| case 4: x += raft::shfl_xor(x, 8); | ||
| case 3: x += raft::shfl_xor(x, 4); | ||
| case 2: x += raft::shfl_xor(x, 2); | ||
| case 1: x += raft::shfl_xor(x, 1); | ||
| case 5: x += raft::shfl_xor(x, 16); [[fallthrough]]; | ||
| case 4: x += raft::shfl_xor(x, 8); [[fallthrough]]; | ||
| case 3: x += raft::shfl_xor(x, 4); [[fallthrough]]; | ||
| case 2: x += raft::shfl_xor(x, 2); [[fallthrough]]; | ||
| case 1: x += raft::shfl_xor(x, 1); [[fallthrough]]; | ||
| default: return x; | ||
| } | ||
| } | ||
|
|
@@ -106,7 +106,6 @@ RAFT_DEVICE_INLINE_FUNCTION void compute_distance_to_random_nodes( | |
| { | ||
| const auto team_size_bits = dataset_desc.team_size_bitshift_from_smem(); | ||
| const auto max_i = raft::round_up_safe<uint32_t>(num_pickup, warp_size >> team_size_bits); | ||
| const auto compute_distance = dataset_desc.compute_distance_impl; | ||
|
|
||
| for (uint32_t i = threadIdx.x >> team_size_bits; i < max_i; i += (blockDim.x >> team_size_bits)) { | ||
| const bool valid_i = (i < num_pickup); | ||
|
|
@@ -115,7 +114,7 @@ RAFT_DEVICE_INLINE_FUNCTION void compute_distance_to_random_nodes( | |
| DistanceT best_norm2_team_local = raft::upper_bound<DistanceT>(); | ||
| for (uint32_t j = 0; j < num_distilation; j++) { | ||
| // Select a node randomly and compute the distance to it | ||
| IndexT seed_index; | ||
| IndexT seed_index = 0; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not completely convinced that there is a problem here. But this does indicate that this can be tightened up. |
||
| if (valid_i) { | ||
| // uint32_t gid = i + (num_pickup * (j + (num_distilation * block_id))); | ||
| uint32_t gid = block_id + (num_blocks * (i + (num_pickup * j))); | ||
|
|
||
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.
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.
👍