-
Notifications
You must be signed in to change notification settings - Fork 914
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
Fix possible int overflow in compute_mixed_join_output_size #17633
Fix possible int overflow in compute_mixed_join_output_size #17633
Conversation
@@ -928,7 +928,7 @@ __launch_bounds__(block_size) CUDF_KERNEL | |||
get_json_object_options options) | |||
{ | |||
auto tid = cudf::detail::grid_1d::global_thread_id(); | |||
auto const stride = cudf::thread_index_type{blockDim.x} * cudf::thread_index_type{gridDim.x}; | |||
auto const stride = cudf::detail::grid_1d::grid_stride(); |
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.
Just a cleanup included here for convenience.
@@ -80,7 +80,7 @@ CUDF_KERNEL void __launch_bounds__(block_size) | |||
auto count_equality = pair_expression_equality<has_nulls>{ | |||
evaluator, thread_intermediate_storage, swap_tables, equality_probe}; | |||
|
|||
for (cudf::size_type outer_row_index = start_idx; outer_row_index < outer_num_rows; | |||
for (auto outer_row_index = start_idx; outer_row_index < outer_num_rows; | |||
outer_row_index += stride) { |
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.
Adding stride
to outer_row_index
when start_index
(thread-index) is within block-size of max int32 will cause it to overflow.
/merge |
Description
Fixes possible integer overflow condition when the number of rows is near max int32 in
compute_mixed_join_output_size
kernel function.Reference #10368
Checklist