Skip to content

Remove redundant template instantiations from table contains#23323

Open
PointKernel wants to merge 1 commit into
rapidsai:mainfrom
PointKernel:reduce-contains-nested-build-time
Open

Remove redundant template instantiations from table contains#23323
PointKernel wants to merge 1 commit into
rapidsai:mainfrom
PointKernel:reduce-contains-nested-build-time

Conversation

@PointKernel

Copy link
Copy Markdown
Member

Description

Related to #21973

Follows #23282

This PR removes redundant explicit template instantiations from table contains. contains_table.cu already instantiates the required primitive and nested implementations, so the separate instantiation TUs only add compile work and object code.

In an uncached CUDA 13.0 build, this eliminates the 1,455s nested TU and the 665s primitive TU. The affected object size drops from 7.98 MB to 3.96 MB.

Runtime performance is unchanged on B200.

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 17, 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.

@PointKernel PointKernel added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change libcudf Affects libcudf (C++/CUDA) code. CMake CMake build issue labels Jul 17, 2026
@PointKernel
PointKernel marked this pull request as ready for review July 17, 2026 22:14
@PointKernel
PointKernel requested review from a team as code owners July 17, 2026 22:14
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ecbd0930-719c-4039-9bc1-571449d3c699

📥 Commits

Reviewing files that changed from the base of the PR and between 35f8f9f and dde403e.

📒 Files selected for processing (4)
  • cpp/CMakeLists.txt
  • cpp/src/search/contains_table_impl.cu
  • cpp/src/search/contains_table_impl_nested.cu
  • cpp/src/search/contains_table_impl_primitive.cu
💤 Files with no reviewable changes (3)
  • cpp/src/search/contains_table_impl_nested.cu
  • cpp/src/search/contains_table_impl_primitive.cu
  • cpp/CMakeLists.txt

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved the build and linking of table-contains functionality by removing obsolete compiled components.
    • Preserved the primary contains implementation while eliminating redundant specialized variants.
  • Maintenance
    • Simplified internal implementation structure and reduced compilation overhead.

Walkthrough

The contains implementation removes explicit template instantiations, simplifies its includes and aliases, and updates the cudf build target to exclude the separate nested and primitive CUDA compilation units.

Changes

Contains implementation cleanup

Layer / File(s) Summary
Remove contains instantiations
cpp/src/search/contains_table_impl.cu
The file header and setup are simplified, and non-nested explicit dispatch_nan_comparator and perform_contains instantiations are removed.
Update cudf source list
cpp/CMakeLists.txt
The cudf target no longer compiles the nested and primitive contains implementation sources.

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

Suggested labels: Performance

Suggested reviewers: pmattione-nvidia

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: removing redundant template instantiations from table contains.
Description check ✅ Passed The description is directly related to the changeset and explains the redundant instantiations removal and its impact.
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.

@GregoryKimball
GregoryKimball removed their request for review July 17, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake CMake build issue 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.

4 participants