Skip to content

Fix how build.sh determines CUDA version - #23588

Merged
rapids-bot[bot] merged 4 commits into
NVIDIA:mainfrom
KyleFromNVIDIA:build.sh-cuda-version
Aug 7, 2026
Merged

Fix how build.sh determines CUDA version#23588
rapids-bot[bot] merged 4 commits into
NVIDIA:mainfrom
KyleFromNVIDIA:build.sh-cuda-version

Conversation

@KyleFromNVIDIA

@KyleFromNVIDIA KyleFromNVIDIA commented Aug 7, 2026

Copy link
Copy Markdown
Member

Description

In #23472, we incorrectly used RAPIDS_CUDA_VERSION in build.sh. This variable comes from CI only and should not be required to build locally. If RAPIDS_CUDA_VERSION is not available, determine the CUDA version in a similar manner to rapids-build-backend: run nvcc --version and parse the output.

Fixes #23587

Checklist

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

In NVIDIA#23472, we incorrectly used
`RAPIDS_CUDA_VERSION` in `build.sh`. This variable comes from CI
only and should not be required to build locally. Determine the
CUDA version in a similar manner to rapids-build-backend: run
`nvcc --version` and parse the output.

Fixes NVIDIA#23587
@KyleFromNVIDIA
KyleFromNVIDIA requested a review from a team as a code owner August 7, 2026 18:41
@KyleFromNVIDIA
KyleFromNVIDIA requested a review from msarahan August 7, 2026 18:41
@KyleFromNVIDIA KyleFromNVIDIA added bug Something isn't working non-breaking Non-breaking change labels Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Improved build configuration to automatically identify the installed CUDA version.
    • Package installation now uses the detected CUDA environment, improving reliability across supported setups.
    • Added an error message when the CUDA version cannot be detected.

Walkthrough

build.sh now detects CUDA_VERSION from nvcc, exits when detection fails, and uses the detected value for Python package installation matrix configuration.

Changes

CUDA version configuration

Layer / File(s) Summary
Detect and apply CUDA version
build.sh
build.sh extracts CUDA_VERSION from nvcc --version, exits when no valid version is found, and uses it instead of RAPIDS_CUDA_VERSION for RAPIDS matrix configuration.

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

Suggested reviewers: msarahan

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The change addresses issue #23587 by removing the local build dependency on RAPIDS_CUDA_VERSION.
Out of Scope Changes check ✅ Passed The changes are limited to CUDA version detection in build.sh and match the linked issue objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly and concisely describes the fix to CUDA version detection in build.sh.
Description check ✅ Passed The description explains the build.sh fix, its local-build impact, and the use of nvcc for CUDA version detection.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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 `@build.sh`:
- Around line 66-67: Validate CUDA_VERSION immediately after the nvcc parsing
assignment: detect nvcc command failure and an empty parsed value, then
terminate the build with a clear error before the RAPIDS matrix configuration
uses it. Preserve the existing version extraction behavior for valid nvcc
output.
🪄 Autofix

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: 89a2a2e3-12d7-47d3-9a89-b1d6698409dc

📥 Commits

Reviewing files that changed from the base of the PR and between d8fdbcc and ee3f5f0.

📒 Files selected for processing (1)
  • build.sh

Comment thread build.sh Outdated
@KyleFromNVIDIA

Copy link
Copy Markdown
Member Author

/merge

@rapids-bot
rapids-bot Bot merged commit 6a22d1d into NVIDIA:main Aug 7, 2026
268 of 273 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 non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] build.sh assumes RAPIDS_CUDA_VERSION is set when run locally

2 participants