Skip to content

Remove invalid CUDF_HOST_DEVICE annotations from constexpr variables - #24237

Open
bdice wants to merge 1 commit into
NVIDIA:mainfrom
bdice:fix/join-no-match-host-device
Open

bdice wants to merge 1 commit into
NVIDIA:mainfrom
bdice:fix/join-no-match-host-device

Conversation

@bdice

@bdice bdice commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Description

CUDA 13.3 emits warning #1835-D when CUDF_HOST_DEVICE applies the function-only __host__ attribute to namespace-scope constexpr variables.

Remove the unnecessary annotation from all nine affected join and groupby constants. The constants remain usable in host and device constant expressions, preserving their values and behavior while avoiding the warning in cuDF and downstream CUDA builds.

Closes #24238.

Checklist

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

@bdice
bdice requested a review from a team as a code owner September 20, 2026 03:59
@bdice
bdice requested review from qbacpey and ttnghia September 20, 2026 03:59
@github-actions github-actions Bot added the libcudf Affects libcudf (C++/CUDA) code. label Sep 20, 2026
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Review Change StackReview 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: 2efaf730-6539-4b1f-9b2d-e982c00606ce

📥 Commits

Reviewing files that changed from the base of the PR and between 2ca9242 and 3db0ee3.

📒 Files selected for processing (3)
  • cpp/src/groupby/hash/compute_shared_memory_aggs.cu
  • cpp/src/groupby/hash/helpers.cuh
  • cpp/src/join/key_remapping.cu

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


📝 Summary

Summary by CodeRabbit

  • Refactor
    • Streamlined internal compile-time configuration for join, grouping, and key-remapping operations.
    • Preserved existing values, calculations, and sentinel behavior while clarifying device-specific usage.
    • No user-visible functionality or behavior changes.

Walkthrough

The change removes unnecessary CUDF_HOST_DEVICE annotations from join and groupby compile-time constants. Constant values and computations remain unchanged. The groupby helper copyright notice is updated.

Changes

Compile-time constant annotation cleanup

Layer / File(s) Summary
Update JoinNoMatch declaration
cpp/include/cudf/join/join.hpp
Removed CUDF_HOST_DEVICE from JoinNoMatch while retaining its constexpr declaration and value.
Update join and groupby constants
cpp/src/groupby/hash/compute_shared_memory_aggs.cu, cpp/src/groupby/hash/helpers.cuh, cpp/src/join/key_remapping.cu
Removed CUDF_HOST_DEVICE from internal constants and valid_extent. Their values and computations remain unchanged. Updated the copyright notice in helpers.cuh.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (1 skipped: 1 …
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.
Title check ✅ Passed The title clearly and concisely describes the primary change: removing invalid CUDF_HOST_DEVICE annotations from constexpr variables.
Description check ✅ Passed The description directly explains the CUDA 13.3 warning, the removal of unnecessary annotations, the affected constants, and the preserved behavior. It is related to the changeset.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

@bdice
bdice force-pushed the fix/join-no-match-host-device branch from 2ca9242 to 3db0ee3 Compare September 20, 2026 04:06
@bdice bdice changed the title Fix CUDA 13.3 warning for JoinNoMatch Fix CUDA 13.3 warnings for constexpr variables Sep 20, 2026
@bdice bdice changed the title Fix CUDA 13.3 warnings for constexpr variables Remove invalid CUDF_HOST_DEVICE annotations from constexpr variables Sep 20, 2026
@bdice bdice added bug Something isn't working non-breaking Non-breaking change labels Sep 20, 2026

@PointKernel PointKernel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Holding this as the error repro doesn't seem legit to me.

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.

[BUG] CUDA compiler warning for CUDF_HOST_DEVICE on constexpr variables

3 participants