Skip to content

Preserve stream and resource when packing empty tables - #24633

Merged
rapids-bot[bot] merged 4 commits into
NVIDIA:mainfrom
vyasr:codex/debug-ci-24239
Oct 15, 2026
Merged

rapids-bot[bot] merged 4 commits into
NVIDIA:mainfrom
vyasr:codex/debug-ci-24239

Conversation

@vyasr

@vyasr vyasr commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

Preserve the caller's CUDA stream and memory resource when packing tables with zero rows or zero columns. Default-constructed zero-byte RMM buffers carry an invalid stream; adopting them into streaming buffers causes CUDA event recording to fail.

Construct these buffers explicitly in the empty-table paths of pack and contiguous_split. Add regression coverage for their stream and memory resource, and update the empty-buffer spill comment.

Checklist

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

@vyasr vyasr added bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels Oct 15, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 15, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@vyasr

vyasr commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 7acf1ca

@vyasr vyasr changed the title Preserve stream and resource when packing empty tables Preserve streams and resources for empty packed and string buffers Oct 15, 2026
@vyasr

vyasr commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test cfc9be5

@vyasr vyasr changed the title Preserve streams and resources for empty packed and string buffers Preserve streams and memory resources for empty buffers and JSON reads Oct 15, 2026
@vyasr

vyasr commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 378a60d

@vyasr vyasr mentioned this pull request Oct 15, 2026
3 tasks done
@vyasr vyasr changed the title Preserve streams and memory resources for empty buffers and JSON reads Preserve stream and resource when packing empty tables Oct 15, 2026
@vyasr

vyasr commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test b5fcf57

@vyasr
vyasr marked this pull request as ready for review October 15, 2026 21:13
@vyasr
vyasr requested review from a team as code owners October 15, 2026 21:13
@vyasr
vyasr requested review from mhaseeb123 and wence- October 15, 2026 21:13
@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/cudf/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: c8f7c783-778e-4756-8931-f684e70960dd
📥 Commits

Reviewing files that changed from the base of the PR and between 14480a1 and b5fcf57.

📒 Files selected for processing: 4
  • cpp/libcudf_streaming/src/table_chunk.cpp
  • cpp/src/copying/contiguous_split.cu
  • cpp/src/copying/pack.cpp
  • cpp/tests/copying/pack_tests.cpp

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Empty packed results now use the configured CUDA stream and memory resource, keeping their handling consistent with non-empty results. This applies to empty inputs and outputs from contiguous splits.

Empty outputs from packing and contiguous splitting now use the configured CUDA stream and memory resource. Tests check zero-byte buffers across empty input shapes. The pinned-host spill comment now states that empty buffers free no memory.

Changes: Empty packed outputs

Layer / File(s) Summary
Construct and validate empty output buffers
cpp/src/copying/contiguous_split.cu, cpp/src/copying/pack.cpp, cpp/tests/copying/pack_tests.cpp, cpp/libcudf_streaming/src/table_chunk.cpp
Empty outputs from contiguous splitting and packing use the selected CUDA stream and memory resource. Tests check buffer properties for empty inputs and split partitions. The pinned-host spill comment states that empty buffers free no memory.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to b5fcf

Empty outputs preserve the selected stream and memory resource, and the fully empty split produces no output buffers. No actionable merge-blocking issue remains; the change is mergeable subject to normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: preserving the caller's CUDA stream and memory resource when packing empty tables.
Description check Passed The description directly explains the empty-table buffer issue, the implementation changes, and the added regression tests.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@vyasr

vyasr commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit b46b4b4 into NVIDIA:main Oct 15, 2026
114 checks passed
@vyasr
vyasr deleted the codex/debug-ci-24239 branch October 15, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants