-
Notifications
You must be signed in to change notification settings - Fork 919
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
Use cudf::thread_index_type
in cuIO to prevent overflow in row indexing
#13910
Merged
rapids-bot
merged 18 commits into
rapidsai:branch-23.10
from
vuule:bug-prevent-overflow-tidx
Aug 23, 2023
Merged
Changes from 6 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
7b01658
spam
vuule 9d1be90
Merge branch 'branch-23.10' of https://github.com/rapidsai/cudf into …
vuule 90fb8aa
Delete CTestCostData.txt
vuule b334d6c
v2
vuule 53a0034
Merge branch 'bug-prevent-overflow-tidx' of https://github.com/vuule/…
vuule 9f5de35
style
vuule 56e6ef7
v3
vuule 946fbb9
grid util
vuule e5c89d2
Merge branch 'branch-23.10' of https://github.com/rapidsai/cudf into …
vuule da4de7e
underflow fix
vuule e49bca9
device_single_thread
vuule 22ba1a9
last pass
vuule 14d7751
unrelated const
vuule f471ac4
Merge branch 'branch-23.10' of https://github.com/rapidsai/cudf into …
vuule 9f09d0c
Merge branch 'branch-23.10' of https://github.com/rapidsai/cudf into …
vuule 0c2a5bb
overload set
vuule 4a179f8
no int64_t
vuule 09be151
Merge branch 'branch-23.10' into bug-prevent-overflow-tidx
vuule 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 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 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 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 |
---|---|---|
|
@@ -110,11 +110,11 @@ __global__ void __launch_bounds__(block_size) | |
populate_dictionary_hash_maps_kernel(device_2dspan<stripe_dictionary> dictionaries, | ||
device_span<orc_column_device_view const> columns) | ||
{ | ||
auto const col_idx = blockIdx.x; | ||
auto const stripe_idx = blockIdx.y; | ||
auto const t = threadIdx.x; | ||
auto& dict = dictionaries[col_idx][stripe_idx]; | ||
auto const& col = columns[dict.column_idx]; | ||
auto const col_idx = blockIdx.x; | ||
auto const stripe_idx = blockIdx.y; | ||
cudf::thread_index_type const t = threadIdx.x; | ||
auto& dict = dictionaries[col_idx][stripe_idx]; | ||
auto const& col = columns[dict.column_idx]; | ||
|
||
// Make a view of the hash map | ||
auto hash_map_mutable = map_type::device_mutable_view(dict.map_slots.data(), | ||
|
@@ -206,9 +206,9 @@ __global__ void __launch_bounds__(block_size) | |
|
||
if (not dict.is_enabled) { return; } | ||
|
||
auto const t = threadIdx.x; | ||
auto const start_row = dict.start_row; | ||
auto const end_row = dict.start_row + dict.num_rows; | ||
cudf::thread_index_type const t = threadIdx.x; | ||
auto const start_row = dict.start_row; | ||
auto const end_row = dict.start_row + dict.num_rows; | ||
|
||
auto const map = map_type::device_view(dict.map_slots.data(), | ||
dict.map_slots.size(), | ||
|
@@ -217,9 +217,7 @@ __global__ void __launch_bounds__(block_size) | |
|
||
auto cur_row = start_row + t; | ||
while (cur_row < end_row) { | ||
auto const is_valid = cur_row < col.size() and col.is_valid(cur_row); | ||
Comment on lines
219
to
-220
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. redundant check with |
||
|
||
if (is_valid) { | ||
if (col.is_valid(cur_row)) { | ||
auto const hash_fn = hash_functor{col}; | ||
auto const equality_fn = equality_functor{col}; | ||
auto const found_slot = map.find(cur_row, hash_fn, equality_fn); | ||
|
This file contains 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 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 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 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 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 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 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.
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.
Promoting just the
threadId.x
does not appear to be enough to promote the multiplicationhttps://godbolt.org/z/coqPKqfWe
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.
moved the promotion to the multiplication