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 offsetalator in orc rowgroup_char_counts_kernel #15891

Merged
merged 1 commit into from
May 31, 2024

Conversation

davidwendt
Copy link
Contributor

Description

Replaces hardcoded size_type for accessing strings offsets data with the offsetalator to compute the number of characters in a group in cudf::io::orc::gpu::rowgroup_char_counts_kernel

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@davidwendt davidwendt added 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 30, 2024
@davidwendt davidwendt self-assigned this May 30, 2024
@davidwendt davidwendt requested a review from a team as a code owner May 30, 2024 17:27
@davidwendt
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 7949a9c into rapidsai:branch-24.08 May 31, 2024
70 checks passed
@davidwendt davidwendt deleted the fix-orc-char-counts branch May 31, 2024 18:54
rapids-bot bot pushed a commit that referenced this pull request Jun 3, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants