Skip to content

Commit

Permalink
Fix kernel launch error for cudf::io::orc::gpu::rowgroup_char_counts_…
Browse files Browse the repository at this point in the history
…kernel (#14139)

Fixes memcheck error found during the nightly builds found in gtest `OrcWriterNumericTypeTest/0.SingleColumn`

```
# compute-sanitizer --tool memcheck gtests/ORC_TEST --gtest_filter=OrcWriterNumericTypeTest/0.SingleColumn --rmm_mode=cuda
========= COMPUTE-SANITIZER
Note: Google Test filter = OrcWriterNumericTypeTest/0.SingleColumn
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from OrcWriterNumericTypeTest/0, where TypeParam = signed char
[ RUN      ] OrcWriterNumericTypeTest/0.SingleColumn
========= Program hit cudaErrorInvalidConfiguration (error 9) due to "invalid configuration argument" on CUDA API call to cudaLaunchKernel.
=========     Saved host backtrace up to driver entry point at error
=========     Host Frame: [0x480aa6]
=========                in /usr/lib/x86_64-linux-gnu/libcuda.so.1
=========     Host Frame:cudaLaunchKernel [0x6c358]
=========                in /conda/envs/rapids/lib/libcudart.so.11.0
=========     Host Frame:__device_stub__ZN4cudf2io3orc3gpu27rowgroup_char_counts_kernelENS_6detail11base_2dspanIiNS_11device_spanEEENS5_IKNS1_22orc_column_device_viewELm18446744073709551615EEENS4_IKNS1_13rowgroup_rowsES5_EENS5_IKjLm18446744073709551615EEE(cudf::detail::base_2dspan<int, cudf::device_span>&, cudf::device_span<cudf::io::orc::orc_column_device_view const, 18446744073709551615ul>&, cudf::detail::base_2dspan<cudf::io::orc::rowgroup_rows const, cudf::device_span>&, cudf::device_span<unsigned int const, 18446744073709551615ul>&) [0x14fccb4]

```

Adds a check to avoid the kernel launch if the number of strings column is zero.

Authors:
  - David Wendt (https://github.com/davidwendt)

Approvers:
  - Nghia Truong (https://github.com/ttnghia)
  - Bradley Dice (https://github.com/bdice)

URL: #14139
  • Loading branch information
davidwendt authored Sep 21, 2023
1 parent fe99e4b commit 05ee260
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cpp/src/io/orc/dict_enc.cu
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ void rowgroup_char_counts(device_2dspan<size_type> counts,

auto const num_rowgroups = rowgroup_bounds.size().first;
auto const num_str_cols = str_col_indexes.size();
if (num_str_cols == 0) { return; }

int block_size = 0; // suggested thread count to use
int min_grid_size = 0; // minimum block count required
Expand Down

0 comments on commit 05ee260

Please sign in to comment.