Skip to content

[BUG] Fix conditional linking of RTCX embed dependencies & Allow null fragment names - #22898

Merged
rapids-bot[bot] merged 4 commits into
NVIDIA:mainfrom
lamarrr:rtcx-linking-fix
Jun 16, 2026
Merged

[BUG] Fix conditional linking of RTCX embed dependencies & Allow null fragment names#22898
rapids-bot[bot] merged 4 commits into
NVIDIA:mainfrom
lamarrr:rtcx-linking-fix

Conversation

@lamarrr

@lamarrr lamarrr commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes conditional compilation bug introduced in #22856.
The Zstd functions are always referenced regardless of the specified compression.
The dependency is always available regardless of the compression type, and it should be linked into the embed runner executable.
It also makes a fix to allow nullptr in fragment names.

Checklist

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

@lamarrr
lamarrr requested a review from a team as a code owner June 16, 2026 02:41
@github-actions github-actions Bot added libcudf Affects libcudf (C++/CUDA) code. CMake CMake build issue labels Jun 16, 2026
@lamarrr
lamarrr requested a review from vyasr June 16, 2026 02:42
@lamarrr lamarrr added bug Something isn't working non-breaking Non-breaking change labels Jun 16, 2026
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

cpp/librtcx/embed.cmake is updated to treat zstd as a mandatory dependency: a top-level guard terminates CMake configuration if the zstd target is absent, and the JIT runner now always links zstd and includes its headers, removing the previous conditional guard. cpp/librtcx/rtcx.cpp adds null-safety to fragment name logging by substituting "<unnamed>" when frag.name is null.

Changes

zstd mandatory dependency and logging robustness

Layer / File(s) Summary
Top-level zstd guard and unconditional JIT runner linkage
cpp/librtcx/embed.cmake
A module-level check errors out if the zstd target is not present. The JIT runner inside embed() now always links zstd and adds ZSTD_INCLUDE_DIR, replacing the prior conditional block gated on ARG_COMPRESSION.
Null-safe fragment name formatting in JIT logging
cpp/librtcx/rtcx.cpp
log_nvJitLink_result now uses "<unnamed>" as a fallback when frag.name is null, preventing potential undefined behavior during string formatting of memory fragment details.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • vyasr
  • mhaseeb123
  • bdice
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly addresses the main changes: fixing conditional linking of RTCX embed dependencies and handling null fragment names, matching the changeset's core modifications.
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.
Description check ✅ Passed The PR description clearly describes the changeset, referencing a previous PR and explaining both the conditional compilation bug fix and the nullptr handling improvement.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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.

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@cpp/librtcx/embed.cmake`:
- Around line 8-10: The error message in the message(FATAL_ERROR...) call within
the `if(NOT TARGET zstd)` block is misleading because it references "when
COMPRESSION is not none", but this check executes unconditionally at module load
time before ARG_COMPRESSION is set by any embed() call. Since zstd is now always
required unconditionally per this PR, update the error message to reflect that
zstd target is required unconditionally, removing the reference to the
COMPRESSION conditional logic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 97c5c6ce-73bd-4eeb-ae56-d3aa83f55d67

📥 Commits

Reviewing files that changed from the base of the PR and between b749f72 and c8f7401.

📒 Files selected for processing (1)
  • cpp/librtcx/embed.cmake

Comment thread cpp/librtcx/embed.cmake
@lamarrr
lamarrr requested a review from a team as a code owner June 16, 2026 02:47
@lamarrr
lamarrr requested a review from wence- June 16, 2026 02:47
@lamarrr lamarrr changed the title [BUG] Fix conditional linking of RTCX embed dependencies [BUG] Fix conditional linking of RTCX embed dependencies & Allow null fragment names Jun 16, 2026
@lamarrr

lamarrr commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit 8eb59e4 into NVIDIA:main Jun 16, 2026
142 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working CMake CMake build issue libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants