Skip to content

Prepare librtcx for standalone usage - #22856

Merged
vyasr merged 6 commits into
NVIDIA:mainfrom
vyasr:feat/librtcx-standalone-cmake
Jun 12, 2026
Merged

Prepare librtcx for standalone usage#22856
vyasr merged 6 commits into
NVIDIA:mainfrom
vyasr:feat/librtcx-standalone-cmake

Conversation

@vyasr

@vyasr vyasr commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

This PR makes a number of changes to rtcx's CMake to support using an out-of-tree version of it.

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 self-assigned this Jun 11, 2026
@vyasr
vyasr requested review from a team as code owners June 11, 2026 18:39
@vyasr vyasr added feature request New feature or request non-breaking Non-breaking change labels Jun 11, 2026
@vyasr
vyasr requested review from davidwendt and lamarrr June 11, 2026 18:39
@copy-pr-bot

copy-pr-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added libcudf Affects libcudf (C++/CUDA) code. CMake CMake build issue labels Jun 11, 2026
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 133117dd-5b05-4a80-a89c-6fd6c88740f5

📥 Commits

Reviewing files that changed from the base of the PR and between 1972d88 and 8a14ff1.

📒 Files selected for processing (15)
  • python/cudf_streaming/cudf_streaming/examples/ray_shuffle_example.py
  • python/cudf_streaming/cudf_streaming/testing.py
  • python/cudf_streaming/cudf_streaming/tests/test_allgather.py
  • python/cudf_streaming/cudf_streaming/tests/test_bloom_filter.py
  • python/cudf_streaming/cudf_streaming/tests/test_integration_partition.py
  • python/cudf_streaming/cudf_streaming/tests/test_partition.py
  • python/cudf_streaming/cudf_streaming/tests/test_shuffler.py
  • python/cudf_streaming/cudf_streaming/tests/test_sparse_alltoall.py
  • python/cudf_streaming/cudf_streaming/tests/test_streaming_allgather.py
  • python/cudf_streaming/cudf_streaming/tests/test_streaming_define_actor.py
  • python/cudf_streaming/cudf_streaming/tests/test_streaming_fanout.py
  • python/cudf_streaming/cudf_streaming/tests/test_streaming_leaf_actor.py
  • python/cudf_streaming/cudf_streaming/tests/test_streaming_shuffler.py
  • python/cudf_streaming/cudf_streaming/tests/test_streaming_sparse_alltoall.py
  • python/cudf_streaming/cudf_streaming/tests/test_table_chunk.py
✅ Files skipped from review due to trivial changes (4)
  • python/cudf_streaming/cudf_streaming/tests/test_table_chunk.py
  • python/cudf_streaming/cudf_streaming/tests/test_streaming_sparse_alltoall.py
  • python/cudf_streaming/cudf_streaming/tests/test_shuffler.py
  • python/cudf_streaming/cudf_streaming/examples/ray_shuffle_example.py

📝 Walkthrough

Summary by CodeRabbit

  • Chores

    • Improved build/install integration with a configurable install option and package export so consumers can find the library from build or install locations.
    • Centralized version/branch references for more consistent configuration loading.
  • Bug Fixes

    • Embedding no longer fails when optional compression is disabled; compression-related include/link checks now run only when enabled.
  • New Features

    • Added a shared test assertion utility and updated tests to import and use it.

Walkthrough

Integrates RAPIDS CMake packaging into librtcx: local VERSION/RAPIDS_BRANCH resolution, switch to rapids_find_package for CUDA tied to an export set, add conditional install/export registration for rtcx, defer zstd validation into embed(), and add a local cudf_streaming.testing.assert_eq used by tests.

Changes

librtcx RAPIDS packaging

Layer / File(s) Summary
Version and RAPIDS configuration
cpp/librtcx/VERSION, cpp/librtcx/RAPIDS_BRANCH, cpp/librtcx/cmake/rapids_config.cmake
Adds local VERSION and RAPIDS_BRANCH references and updates rapids_config.cmake to read them from cpp/librtcx/cmake/.. instead of the repository root.
RAPIDS CMake integration and dependency management
cpp/librtcx/CMakeLists.txt
Includes RAPIDS CMake modules and replaces find_package(CUDAToolkit REQUIRED) with rapids_find_package(... BUILD_EXPORT_SET rtcx-exports INSTALL_EXPORT_SET rtcx-exports).
Install and export configuration
cpp/librtcx/CMakeLists.txt
Adds GNUInstallDirs, RTCX_INSTALL option, consumer configure-time code strings, conditional install of rtcx target/headers/embed assets, and registers install-time and unconditional build-tree exports via rapids_export.
Lazy zstd requirement validation
cpp/librtcx/embed.cmake
Removes top-level zstd check; embed() now links ${CMAKE_DL_LIBS} always and only requires zstd (with fatal error) when COMPRESSION is not none.
cudf_streaming testing helper and imports
python/cudf_streaming/cudf_streaming/testing.py, python/cudf_streaming/cudf_streaming/examples/*, python/cudf_streaming/cudf_streaming/tests/*
Adds assert_eq utility and switches tests/examples to import it from cudf_streaming.testing instead of rapidsmpf.testing; some import reordering.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

improvement

Suggested reviewers

  • lamarrr
  • davidwendt
  • bdice
  • igorpeshansky
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Prepare librtcx for standalone usage' accurately summarizes the main change: updating rtcx's CMake configuration to support out-of-tree usage.
Description check ✅ Passed The description is related to the changeset, explaining that the PR makes changes to rtcx's CMake to support out-of-tree usage and noting test coverage and documentation updates.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ 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 271-279: The embed() logic currently always requires and links
zstd (target_include_directories/target_link_libraries and the NOT TARGET zstd
check), which breaks when COMPRESSION is set to "none"; update the CMake snippet
to only perform the zstd include/check/link when the COMPRESSION variable is not
"none" (i.e., wrap the zstd-related target_include_directories, the NOT TARGET
zstd FATAL_ERROR check, and the target_link_libraries(... zstd) call in a
conditional that checks COMPRESSION != "none" while leaving
set_target_properties(${RUNNER} ...) unchanged; reference RUNNER and the zstd
target in the conditional).
🪄 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: c27fe1d2-da0f-4117-b0c9-4726ac3e80ae

📥 Commits

Reviewing files that changed from the base of the PR and between b5588b6 and 9e2c29e.

📒 Files selected for processing (5)
  • cpp/librtcx/CMakeLists.txt
  • cpp/librtcx/RAPIDS_BRANCH
  • cpp/librtcx/VERSION
  • cpp/librtcx/cmake/rapids_config.cmake
  • cpp/librtcx/embed.cmake

Comment thread cpp/librtcx/embed.cmake Outdated
Comment thread cpp/librtcx/RAPIDS_BRANCH Outdated
@@ -0,0 +1 @@
main

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.

Is this a symlink? This and VERSION should be symlinks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can change it for now, but it'll wind up getting copied as soon as we split this out into its own repo anyway.

@bdice bdice left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All looks fine aside from the symlink question.

vyasr added 4 commits June 11, 2026 13:12
Replace manual configure_package_config_file with rapids_export() for
both BUILD and INSTALL tree exports. This generates rtcx-config.cmake
(lowercase dash naming) matching RAPIDS conventions.

Changes:
- Add rapids-export and rapids-find to standalone guard
- Use rapids_find_package(CUDAToolkit) with export sets
- Add FINAL_CODE_BLOCK for embed.cmake include and rtcx_LIBCXX_DIR
- Separate code blocks for install-tree (relative) vs build-tree (absolute)
- Build-tree export always active for CPM consumers
- Delete rtcxConfig.cmake.in (replaced by rapids_export auto-generation)
@vyasr
vyasr force-pushed the feat/librtcx-standalone-cmake branch from 9e2c29e to ece1fb6 Compare June 11, 2026 20:18
@vyasr
vyasr requested a review from KyleFromNVIDIA June 11, 2026 20:19
@vyasr
vyasr force-pushed the feat/librtcx-standalone-cmake branch from 4c3022f to 1972d88 Compare June 12, 2026 00:22
rapidsmpf#1094 removed assert_eq from rapidsmpf.testing. Copy the
implementation into cudf_streaming.testing and update all imports.
@vyasr
vyasr requested a review from a team as a code owner June 12, 2026 04:18
@github-actions github-actions Bot added the Python Affects Python cuDF API. label Jun 12, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Jun 12, 2026
@vyasr

vyasr commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

rapidsai/rapidsmpf#1094 removed the rapidsmpf.testing.assert_eq utility, which it turns out cudf_streaming tests were still relying on. That was an oversight as part of the transition. Aside from that, CI was passing on this previous run on 1972d88. Normally I would make a separate PR to fix this kind of issue, and the fix I pushed here requires a review from rapidsmpf-python-codeowners, but cudf CI has been blocked enough lately and the change I made to get the cudf_streaming tests passing is pretty noncontroversial (just copying in a test helper), so I will admin-merge as soon as CI passes to get things unblocked.

@vyasr
vyasr merged commit d59ba97 into NVIDIA:main Jun 12, 2026
132 of 134 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python Jun 12, 2026
@vyasr
vyasr deleted the feat/librtcx-standalone-cmake branch June 12, 2026 16:35
abigalekim pushed a commit to abigalekim/cudf that referenced this pull request Jun 12, 2026
## Description
<!-- Provide a standalone description of changes in this PR. -->
<!-- Reference any issues closed by this PR with "closes NVIDIA#1234". -->
<!-- Note: The pull request title will be included in the CHANGELOG. -->
This PR makes a number of changes to rtcx's CMake to support using an
out-of-tree version of it.

## Checklist
- [x] I am familiar with the [Contributing
Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md).
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
rapids-bot Bot pushed a commit that referenced this pull request Jun 16, 2026
… fragment names (#22898)

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.

Authors:
  - Basit Ayantunde (https://github.com/lamarrr)

Approvers:
  - Bradley Dice (https://github.com/bdice)

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

Labels

CMake CMake build issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants