-
Notifications
You must be signed in to change notification settings - Fork 54
Fix test_wheel_deps_wheels.sh to actually uninstall nvvm and nvrtc packages for CUDA 13
#701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test |
ci/test_wheel_deps_wheels.sh
Outdated
| nvrtc_pkgs=$(dpkg --get-selections | awk '/nvrtc/ {print $1}') | ||
|
|
||
| if [[ -z "$nvvm_pkgs" || -z "$nvrtc_pkgs" ]]; then | ||
| echo "Expected both nvvm and nvrtc packages to be present, but at least one was missing" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem that helpful since it leaves a person guessing which one was missing.
Can we have two conditionals, one for each of nvvm and nvrtc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup - addressing
|
/ok to test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
This PR refactors the nvvm and nvrtc package removal logic in the wheel dependency test script. The changes improve error handling by explicitly checking for package existence before attempting removal, providing clearer error messages when expected packages are missing. The refactored code stores package names in variables first, validates their presence, and then removes them - making the script more robust and easier to debug. The removal of apt-get update is appropriate since package list updates aren't needed for removal operations.
Confidence Score: 4/5
- This PR is safe to merge with minimal risk
- The changes improve the robustness of the package removal logic with better error handling and validation. The refactored code is clearer and more maintainable. One minor style suggestion was noted about variable quoting, but the current unquoted usage is actually correct for this use case since word splitting is needed to pass multiple package names as separate arguments
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| ci/test_wheel_deps_wheels.sh | 4/5 | Improved package removal logic with explicit validation and clearer error messages; removes unnecessary apt-get update call |
Additional Comments (1)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
This PR fixes the test_wheel_deps_wheels.sh script to properly detect and uninstall nvvm and nvrtc packages for CUDA 13 testing. The old implementation used inline command substitution with backticks which could fail silently if no packages were found. The new implementation:
- Stores package names in variables before attempting removal
- Validates that packages exist with clear error messages before proceeding
- Exits with status 1 if expected packages are not found, preventing silent failures
Key improvements:
- Added validation checks (lines 32-40) that error out if packages aren't found
- Removed
apt-get updatewhich was unnecessary for package removal - Changed from inline command substitution to variable storage for better error handling
- More descriptive error messages that specify which package type is missing
Minor improvement suggested:
- Variables on lines 42-43 should be quoted per bash best practices
Confidence Score: 4/5
- This PR is safe to merge with minimal risk - it improves error detection in CI scripts
- The changes improve robustness by adding validation checks that prevent silent failures. The logic is straightforward and addresses a real issue where package removal could fail without being detected. Score is 4/5 (not 5) due to the unquoted variable expansion on lines 42-43, which should be quoted per bash best practices to prevent potential word splitting issues
- No files require special attention - the suggested improvement is a minor style fix
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| ci/test_wheel_deps_wheels.sh | 4/5 | Script improved to validate nvvm/nvrtc packages exist before removal with better error messages; unquoted variable expansion on lines 42-43 could be more robust |
Additional Comments (1)
|
- Add arch specific target support (NVIDIA#549) - chore: disable `locked` flag to bypass prefix-dev/pixi#5256 (NVIDIA#714) - ci: relock pixi (NVIDIA#712) - ci: remove redundant conda build in ci (NVIDIA#711) - chore(deps): bump numba-cuda version and relock pixi (NVIDIA#707) - Dropping bits in the old CI & Propagating recent changes from cuda-python (NVIDIA#683) - Fix `test_wheel_deps_wheels.sh` to actually uninstall `nvvm` and `nvrtc` packages for CUDA 13 (NVIDIA#701) - perf: remove some exception control flow and buffer-exception penalization for arrays (NVIDIA#700) - perf: let CAI fall through instead of calling from_cuda_array_interface (NVIDIA#694) - chore: perf lint (NVIDIA#697) - chore(deps): bump deps in pixi lockfile (NVIDIA#693) - fix: use freethreading-supported `_PySet_NextItemRef` where possible (NVIDIA#682) - Support python `3.14` (NVIDIA#599) - Remove customized address space tracking and address class emission in debug info (NVIDIA#669) - Drop `experimental` from cuda.core namespace imports (NVIDIA#676) - Remove dangling references to NUMBA_CUDA_ENABLE_MINOR_VERSION_COMPATIBILITY (NVIDIA#675) - Use `rapidsai/sccache` in CI (NVIDIA#674) - chore(dev-deps): remove ipython and pyinstrument (NVIDIA#670) - Set up a new VM-based CI infrastructure (NVIDIA#604)
- Add arch specific target support (#549) - chore: disable `locked` flag to bypass prefix-dev/pixi#5256 (#714) - ci: relock pixi (#712) - ci: remove redundant conda build in ci (#711) - chore(deps): bump numba-cuda version and relock pixi (#707) - Dropping bits in the old CI & Propagating recent changes from cuda-python (#683) - Fix `test_wheel_deps_wheels.sh` to actually uninstall `nvvm` and `nvrtc` packages for CUDA 13 (#701) - perf: remove some exception control flow and buffer-exception penalization for arrays (#700) - perf: let CAI fall through instead of calling from_cuda_array_interface (#694) - chore: perf lint (#697) - chore(deps): bump deps in pixi lockfile (#693) - fix: use freethreading-supported `_PySet_NextItemRef` where possible (#682) - Support python `3.14` (#599) - Remove customized address space tracking and address class emission in debug info (#669) - Drop `experimental` from cuda.core namespace imports (#676) - Remove dangling references to NUMBA_CUDA_ENABLE_MINOR_VERSION_COMPATIBILITY (#675) - Use `rapidsai/sccache` in CI (#674) - chore(dev-deps): remove ipython and pyinstrument (#670) - Set up a new VM-based CI infrastructure (#604)
Xref #699