Skip to content
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 get_json_object and tdigest kernels #13962

Merged
merged 5 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/src/quantiles/tdigest/tdigest.cu
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ __global__ void compute_percentiles_kernel(device_span<size_type const> tdigest_
double const* cumulative_weight_,
double* output)
{
int const tid = threadIdx.x + blockIdx.x * blockDim.x;
auto const tid = cudf::detail::grid_1d::global_thread_id();

auto const num_tdigests = tdigest_offsets.size() - 1;
auto const tdigest_index = tid / percentiles.size();
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/strings/json/json_path.cu
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,8 @@ __launch_bounds__(block_size) __global__
thrust::optional<size_type*> out_valid_count,
get_json_object_options options)
{
size_type tid = threadIdx.x + (blockDim.x * blockIdx.x);
size_type stride = blockDim.x * gridDim.x;
auto tid = cudf::detail::grid_1d::global_thread_id();
auto const stride = cudf::thread_index_type{blockDim.x} * cudf::thread_index_type{gridDim.x};

size_type warp_valid_count{0};

Expand Down