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

Fix debug assert in rowgroup_char_counts_kernel #15902

Merged

Conversation

davidwendt
Copy link
Contributor

Description

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.

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 bug Something isn't working 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels May 31, 2024
@davidwendt davidwendt self-assigned this May 31, 2024
@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Jun 3, 2024
@davidwendt davidwendt marked this pull request as ready for review June 3, 2024 13:37
@davidwendt davidwendt requested a review from a team as a code owner June 3, 2024 13:37
Copy link
Contributor

@mythrocks mythrocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. LGTM!

@vyasr
Copy link
Contributor

vyasr commented Jun 3, 2024

/merge

@rapids-bot rapids-bot bot merged commit 7d5561a into rapidsai:branch-24.08 Jun 3, 2024
70 checks passed
@davidwendt davidwendt deleted the debug-orc-empty-list-strs branch June 3, 2024 19:49
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 bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants