-
Notifications
You must be signed in to change notification settings - Fork 112
Replace cudf Column and Buffers APIs with pylibcudf and public cuDF APIs #781
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
base: main
Are you sure you want to change the base?
Replace cudf Column and Buffers APIs with pylibcudf and public cuDF APIs #781
Conversation
📝 WalkthroughWalkthroughThis PR updates copyright years to 2026 across Cython files, removes deprecated cudf buffer-wrapping dependencies by simplifying buffer handling to use CUDA array interfaces directly, and adds a new MPS format file for mixed-integer programming problems. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used🧠 Learnings (3)📚 Learning: 2026-01-14T00:38:38.038ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
🔇 Additional comments (2)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
python/cuopt/cuopt/routing/utils_wrapper.pyx (1)
108-115: Do not mutateDeviceBuffer.__cuda_array_interface__directly; copy the descriptor or pass the owner to Numba.The pattern of getting the descriptor directly and mutating its
shapeandtypestrmodifies the DeviceBuffer's own interface state. While the mutation happens before Numba reads it (safe for the immediate call), subsequent access to the buffer's descriptor would return the modified values.Use one of these approaches instead:
# Option 1: Copy the descriptor before mutating desc = matrices_buf.__cuda_array_interface__.copy() desc["shape"] = (n_vehicle_types, n_matrix_types, locations, locations) desc["typestr"] = "f4" matrices = cuda.from_cuda_array_interface(desc)Or:
# Option 2: Pass owner to keep buffer alive and avoid relying on mutation desc = matrices_buf.__cuda_array_interface__ desc["shape"] = (n_vehicle_types, n_matrix_types, locations, locations) desc["typestr"] = "f4" matrices = cuda.from_cuda_array_interface(desc, owner=matrices_buf)This applies to all four locations: 108–115, 140–146, 150–156, 171–176.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
python/cuopt/cuopt/distance_engine/waypoint_matrix_wrapper.pyxpython/cuopt/cuopt/routing/utils_wrapper.pyxpython/small_mip.mps
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2026-01-14T00:38:38.038Z
Learnt from: chris-maes
Repo: NVIDIA/cuopt PR: 746
File: cpp/src/dual_simplex/barrier.cu:549-552
Timestamp: 2026-01-14T00:38:38.038Z
Learning: In cpp/src/dual_simplex/barrier.cu's form_adat() method within the barrier solver, the raft::copy from d_original_A_values to device_AD.x is necessary and must not be removed. This copy restores the original matrix A values before they are scaled by the diagonal matrix D (via d_inv_diag_prime). Since D changes between iterations and the scaling mutates device_AD.x, copying the original values each iteration is required for correctness.
Applied to files:
python/cuopt/cuopt/routing/utils_wrapper.pyx
📚 Learning: 2025-11-25T10:20:49.822Z
Learnt from: CR
Repo: NVIDIA/cuopt PR: 0
File: .github/.coderabbit_review_guide.md:0-0
Timestamp: 2025-11-25T10:20:49.822Z
Learning: Applies to **/*.{cu,cuh,cpp,hpp,h} : Refactor code duplication in solver components (3+ occurrences) into shared utilities; for GPU kernels, use templated device functions to avoid duplication
Applied to files:
python/cuopt/cuopt/routing/utils_wrapper.pyx
📚 Learning: 2025-11-25T10:20:49.822Z
Learnt from: CR
Repo: NVIDIA/cuopt PR: 0
File: .github/.coderabbit_review_guide.md:0-0
Timestamp: 2025-11-25T10:20:49.822Z
Learning: Applies to **/*.{cu,cuh,cpp,hpp,h} : Check that hard-coded GPU device IDs and resource limits are made configurable; abstract multi-backend support for different CUDA versions
Applied to files:
python/cuopt/cuopt/routing/utils_wrapper.pyx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: wheel-build-cuopt-sh-client / 13.1.0, 3.10, amd64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.1.0, 3.11, arm64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.1.0, 3.11, amd64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.1.0, 3.13, amd64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.1.0, 3.10, arm64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.1.0, 3.10, amd64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.1.0, 3.13, arm64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.1.0, 3.12, arm64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.1.0, 3.12, amd64, rockylinux8
- GitHub Check: checks / check-style
🔇 Additional comments (2)
python/cuopt/cuopt/distance_engine/waypoint_matrix_wrapper.pyx (1)
1-1: Copyright year update looks good.python/small_mip.mps (1)
1-46: LGTM: MPS model file appears well-formed.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Description
Replace cudf Column and Buffers APIs with pylibcudf and public cuDF APIs
Issue
closes #762 579
Checklist
Summary by CodeRabbit
Refactor
Chores
Tests
✏️ Tip: You can customize this high-level summary in your review settings.