Skip to content

fix: declare libcudf wheel CUDA runtime dependencies#23414

Open
bdice wants to merge 11 commits into
rapidsai:mainfrom
bdice:fix/libcudf-cufile-wheel-deps
Open

fix: declare libcudf wheel CUDA runtime dependencies#23414
bdice wants to merge 11 commits into
rapidsai:mainfrom
bdice:fix/libcudf-cufile-wheel-deps

Conversation

@bdice

@bdice bdice commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

This fixes some wheel packaging issues in libcudf / cudf. The main goal is to declare the CUDA runtime libraries loaded by libcudf wheels: NVRTC and nvJitLink.

Previously we included an nvcc component which was needed by numba-cuda, but that is now handled through our dependency on numba-cuda[cu12] which includes the necessary CUDA wheels.

In #23392, we added a dependency on cuFile, but this was incorrect. cuDF doesn't use cuFile directly, it is only used through KvikIO. rapidsai/kvikio#1013 supplies the corresponding cuFile metadata for KvikIO, so we don't need that here.

This PR also adds an isolated libcudf.load_library() wheel smoke test before pylibcudf test extras are installed, so that test dependencies cannot mask missing libcudf wheel requirements. This kind of test revealed the issue in KvikIO's packaging, so we should add similar tests here.

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 23, 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 Java Affects Java cuDF API. labels Jul 23, 2026
@bdice
bdice force-pushed the fix/libcudf-cufile-wheel-deps branch from 3a4e5a8 to dc5279d Compare July 23, 2026 18:18
@copy-pr-bot

copy-pr-bot Bot commented Jul 23, 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 Python Affects Python cuDF API. label Jul 23, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Jul 23, 2026
@bdice bdice changed the title fix: install cuFile with libcudf wheels fix: declare libcudf wheel CUDA runtime dependencies Jul 23, 2026
@bdice bdice added bug Something isn't working non-breaking Non-breaking change and removed libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. CMake CMake build issue Java Affects Java cuDF API. labels Jul 23, 2026
@bdice
bdice marked this pull request as ready for review July 23, 2026 19:32
@bdice
bdice requested review from a team as code owners July 23, 2026 19:32
@bdice
bdice requested a review from KyleFromNVIDIA July 23, 2026 19:32
@bdice bdice added the DO NOT MERGE Hold off on merging; see PR for details label Jul 23, 2026
@bdice

bdice commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

If CI passes, this should be retargeted to release/26.08. I want to test in 26.10 because it is using the base flavor of the nvidia/cuda image, but if it works, the fix should go into 26.08.

Also note that CI may fail until rapidsai/kvikio#1013 is merged.

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

Makes sense to me, and the smoke test is wonderful. Thanks!

@coderabbitai

coderabbitai Bot commented Jul 23, 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: c2ebfd3e-f94d-4a00-aa31-97a4ccad7c46

📥 Commits

Reviewing files that changed from the base of the PR and between 9d7fdd5 and 9dae08d.

📒 Files selected for processing (2)
  • ci/test_wheel_cudf.sh
  • ci/test_wheel_cudf_streaming.sh
🚧 Files skipped from review as they are similar to previous changes (2)
  • ci/test_wheel_cudf_streaming.sh
  • ci/test_wheel_cudf.sh

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Strengthened cuDF wheel validation by adding an explicit runtime library load check.
    • Strengthened cuDF streaming wheel validation by importing the package and verifying runtime library availability.
  • Chores
    • Updated CUDA toolkit and nvJitLink dependency selection to better align CUDA 12.x vs 13.x builds.
    • Added/updated CUDA 13.x nvRTC runtime dependency metadata for libcudf.
    • Refreshed licensing attribution and improved wheel build/test setup by using dedicated virtual environments per component.

Walkthrough

The PR updates CUDA 12 and 13 wheel dependency selection, adds CUDA 13 NVRTC requirements, enables CUDA wheel selection for libcudf builds, and validates libcudf-related wheels in dedicated virtual environments.

Changes

CUDA wheel updates

Layer / File(s) Summary
CUDA dependency selection
dependencies.yaml, python/libcudf/pyproject.toml, ci/build_wheel_libcudf.sh
CUDA toolkit requirements use NVRTC packages with explicit nvJitLink pins; libcudf declares the CUDA 13 NVRTC dependency; and libcudf build requirements enable CUDA wheel selection.
Isolated libcudf and pylibcudf wheel testing
ci/test_wheel_cudf.sh
Wheel tests install and runtime-check libcudf in libcudf-env, then install pylibcudf in a separate pylibcudf-env.
Streaming wheel runtime validation
ci/test_wheel_cudf_streaming.sh
Streaming wheel tests install and runtime-check libcudf_streaming in a dedicated virtual environment.

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

Possibly related PRs

Suggested labels: libcudf, ci

Suggested reviewers: kylefromnvidia, msarahan, vyasr

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: declaring libcudf wheel CUDA runtime dependencies.
Description check ✅ Passed The description matches the changeset and correctly explains the packaging fixes and new wheel smoke test.
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.

@github-actions github-actions Bot added the Python Affects Python cuDF API. label Jul 23, 2026

@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 `@ci/test_wheel_cudf_streaming.sh`:
- Around line 25-30: Update the install command in the wheel smoke test to
install the matching local libcudf, librapidsmpf, and librmm runtime wheels
alongside libcudf_streaming, using the same RAPIDS_PY_CUDA_SUFFIX and wheelhouse
selection. Ensure load_library() resolves these locally built dependencies
rather than falling back to system installations.
🪄 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: 69634d51-afe5-4f2a-b231-936ef8229244

📥 Commits

Reviewing files that changed from the base of the PR and between 791dc8f and 4a612fb.

📒 Files selected for processing (1)
  • ci/test_wheel_cudf_streaming.sh

Comment thread ci/test_wheel_cudf_streaming.sh Outdated
Comment on lines +25 to +30
rapids-pip-retry install \
-v \
--prefer-binary \
--constraint "${PIP_CONSTRAINT}" \
"$(echo "${LIBCUDF_STREAMING_WHEELHOUSE}"/libcudf_streaming_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)"
python -c "import libcudf_streaming; libcudf_streaming.load_library()"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

. libcudf-streaming-env/bin/activate
python - <<'PY'
from importlib import metadata

for name in ("libcudf_streaming", "libcudf", "librapidsmpf", "librmm"):
    try:
        dist = metadata.distribution(name)
    except metadata.PackageNotFoundError:
        print(f"{name}: MISSING")
    else:
        print(f"{name}: {dist.version} ({dist.locate_file('')})")

print("libcudf_streaming requirements:")
for requirement in metadata.metadata("libcudf_streaming").get_all("Requires-Dist") or []:
    print(requirement)
PY
deactivate

Repository: rapidsai/cudf

Length of output: 227


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '\n== Files ==\n'
git ls-files 'ci/test_wheel_cudf_streaming.sh' 'ci/test_wheel_cudf.sh' 'python/libcudf_streaming/libcudf_streaming/load.py' 'python/libcudf_streaming/pyproject.toml' 'python/libcudf_streaming/setup.py'

printf '\n== Outline: ci/test_wheel_cudf_streaming.sh ==\n'
ast-grep outline ci/test_wheel_cudf_streaming.sh --view expanded || true

printf '\n== Outline: ci/test_wheel_cudf.sh ==\n'
ast-grep outline ci/test_wheel_cudf.sh --view expanded || true

printf '\n== Outline: python/libcudf_streaming/libcudf_streaming/load.py ==\n'
ast-grep outline python/libcudf_streaming/libcudf_streaming/load.py --view expanded || true

printf '\n== Read relevant slices ==\n'
sed -n '1,220p' ci/test_wheel_cudf_streaming.sh
printf '\n--- ci/test_wheel_cudf.sh ---\n'
sed -n '1,220p' ci/test_wheel_cudf.sh
printf '\n--- load.py ---\n'
sed -n '1,220p' python/libcudf_streaming/libcudf_streaming/load.py
printf '\n--- metadata files ---\n'
sed -n '1,220p' python/libcudf_streaming/pyproject.toml 2>/dev/null || true
sed -n '1,220p' python/libcudf_streaming/setup.py 2>/dev/null || true

Repository: rapidsai/cudf

Length of output: 12787


Install the matching runtime wheels in this smoke test. This step only installs libcudf_streaming, but libcudf_streaming.load_library() imports libcudf, librapidsmpf, and librmm, and can fall back to system paths if those imports are missing. Add the matching local runtime wheels here, or assert the expected wheel metadata, so this job actually exercises the wheel set produced by the build.

🤖 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 `@ci/test_wheel_cudf_streaming.sh` around lines 25 - 30, Update the install
command in the wheel smoke test to install the matching local libcudf,
librapidsmpf, and librmm runtime wheels alongside libcudf_streaming, using the
same RAPIDS_PY_CUDA_SUFFIX and wheelhouse selection. Ensure load_library()
resolves these locally built dependencies rather than falling back to system
installations.

@bdice

bdice commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 9d7fdd5

@bdice

bdice commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 9dae08d

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

Labels

bug Something isn't working DO NOT MERGE Hold off on merging; see PR for details non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants