Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix debug assert in rowgroup_char_counts_kernel (#15902)
Fixes assert triggered by `OrcWriterTest.EmptyChildStringColumn` in a Debug build. ``` $ gtests/ORC_TEST --gtest_filter=OrcWriterTest.EmptyChildStringColumn Note: Google Test filter = OrcWriterTest.EmptyChildStringColumn [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from OrcWriterTest [ RUN ] OrcWriterTest.EmptyChildStringColumn /cudf/cpp/include/cudf/detail/offsets_iterator.cuh:79: cudf::detail::input_offsetalator::input_offsetalator(const void *, cudf::data_type, int): block: [0,0,0], thread: [0,0,0] Assertion `(dtype.id() == type_id::INT32 || dtype.id() == type_id::INT64) && "Unexpected offsets type"` failed. CUDA Error detected. cudaErrorAssert device-side assert triggered ORC_TEST: /conda/envs/rapids/include/rmm/mr/device/detail/stream_ordered_memory_resource.hpp:248: void rmm::mr::detail::stream_ordered_memory_resource<PoolResource, FreeListType>::do_deallocate(void*, std::size_t, rmm::cuda_stream_view) [with PoolResource = rmm::mr::pool_memory_resource<rmm::mr::cuda_memory_resource>; FreeListType = rmm::mr::detail::coalescing_free_list; std::size_t = long unsigned int]: Assertion `status__ == cudaSuccess' failed. Aborted (core dumped) ``` Error introduced in #15891 where offsetalator wraps an offsets column in the `cudf::io::orc::gpu::rowgroup_char_counts_kernel`. But when `num_rows==0` the offsets column is `EMPTY` causing the assert to trigger. Checking the `num_rows` before accessing the offsets column fixes the issue. Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Bradley Dice (https://github.com/bdice) - MithunR (https://github.com/mythrocks) URL: #15902
- Loading branch information