Skip to content

Add memory resource parameter to cudf::filtered_join constructors - #23264

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
PointKernel:add-mr-filtered-join
Jul 21, 2026
Merged

Add memory resource parameter to cudf::filtered_join constructors#23264
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
PointKernel:add-mr-filtered-join

Conversation

@PointKernel

Copy link
Copy Markdown
Member

Description

Follow-up to #23220 and #23223.

This PR adds an mr parameter to the cudf::filtered_join constructors to control the memory usage of the internal cuco hash table, to better align with the temporary mr effort (#20780).

Checklist

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

@copy-pr-bot

copy-pr-bot Bot commented Jul 14, 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.

@github-actions github-actions Bot added the libcudf Affects libcudf (C++/CUDA) code. label Jul 14, 2026
@PointKernel PointKernel added feature request New feature or request non-breaking Non-breaking change labels Jul 14, 2026
@PointKernel

Copy link
Copy Markdown
Member Author

/ok to test 78d0628

@PointKernel
PointKernel marked this pull request as ready for review July 15, 2026 22:57
@PointKernel
PointKernel requested a review from a team as a code owner July 15, 2026 22:57
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Filtered joins now support providing a device memory resource for internal hash-table allocations via a new mr parameter.
    • Constructors default to the current device memory resource when mr isn’t specified, keeping existing usage unchanged.
  • Tests
    • Added a test to verify filtered-join/semi-join allocations are routed through the selected memory resource and that results match expectations.

Walkthrough

Filtered join constructors now accept a device memory resource, propagate it to internal hash-table allocation, and retain a default public resource. A semi-join test verifies tracked allocation and expected results.

Changes

Filtered join memory resource

Layer / File(s) Summary
Constructor contracts and defaults
cpp/include/cudf/detail/join/*.cuh, cpp/include/cudf/join/filtered_join.hpp
Filtered join constructor declarations and documentation add the device memory resource parameter, with public overloads defaulting to the current device resource.
Resource propagation and validation
cpp/src/join/filtered_join.cu, cpp/tests/join/semi_anti_join_tests.cpp
The supplied resource is used for bucket storage allocation and forwarded through constructors; a statistics adaptor test verifies allocation and semi-join results.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: gregorykimball, davidwendt, mhaseeb123

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main API change: adding an mr parameter to filtered_join constructors.
Description check ✅ Passed The description is directly related and accurately summarizes the filtered_join mr parameter change and the added tests/docs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

rapids-bot Bot pushed a commit that referenced this pull request Jul 20, 2026
Follow-up to #23264 and #23277.

This PR adds an `mr` parameter to the `cudf::mark_join` constructors to control allocations for the persistent cuco hash table and optional bloom-filter prefilter, aligning the wrapper with the temporary MR effort (#20780).

Authors:
  - Yunsong Wang (https://github.com/PointKernel)

Approvers:
  - David Wendt (https://github.com/davidwendt)
  - Qi Chen (https://github.com/qbacpey)

URL: #23278
@vyasr

vyasr commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

/merge

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
cpp/tests/join/semi_anti_join_tests.cpp (1)

550-560: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Exercise cudf::filtered_join, not cudf::mark_join.

Lines 557-560 only validate memory allocation for cudf::mark_join; they never construct cudf::filtered_join or call semi_join/anti_join. Consequently, this test will pass even if the new filtered-join constructor drops mr before allocating its internal hash table. Construct cudf::filtered_join with mr, execute a filtered join, and assert the tracked allocation plus expected row indices.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/tests/join/semi_anti_join_tests.cpp` around lines 550 - 560, Update
MarkJoinMemoryResource to construct cudf::filtered_join with mr and execute a
semi_join or anti_join using the test tables. Assert mr records a positive
allocation and verify the returned row indices match the expected filtered-join
result, rather than testing cudf::mark_join construction alone.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@cpp/tests/join/semi_anti_join_tests.cpp`:
- Around line 550-560: Update MarkJoinMemoryResource to construct
cudf::filtered_join with mr and execute a semi_join or anti_join using the test
tables. Assert mr records a positive allocation and verify the returned row
indices match the expected filtered-join result, rather than testing
cudf::mark_join construction alone.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 17f8b66d-d12a-495b-ae27-9ed442be23c2

📥 Commits

Reviewing files that changed from the base of the PR and between 7e25468 and bc3e02d.

📒 Files selected for processing (1)
  • cpp/tests/join/semi_anti_join_tests.cpp

@rapids-bot
rapids-bot Bot merged commit 5b4b937 into NVIDIA:main Jul 21, 2026
136 checks passed
rapids-bot Bot pushed a commit that referenced this pull request Jul 27, 2026
)

Follow-up to #23264.

This PR adds an `mr` parameter to the `cudf::key_remapping` constructor to control the memory usage of the internal cuco hash table, to better align with the temporary mr effort (#20780).

Authors:
  - Yunsong Wang (https://github.com/PointKernel)
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Basit Ayantunde (https://github.com/lamarrr)

URL: #23277
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request 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