[cuda] fix: hide nvml-only unstartable gpu listings - #135
Conversation
|
Warning Review limit reached
More reviews will be available in 53 minutes and 23 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughGates NVML GPU enumeration on Torch CUDA startability: two new helper functions check Torch's visible device count and probe each ordinal via ChangesCUDA NVML Startable Listing Gate
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Code Review
This pull request ensures that CUDA NVML records are only returned when Torch CUDA can address the same visible ordinal set, preventing the advertisement of NVML-only devices that cannot be started. It introduces validation checks in gpu_info.py to verify Torch CUDA availability, matching visible counts, and startable ordinals, and removes the fallback to ROCm SMI on non-HIP builds. Comprehensive unit tests and documentation updates have been added to support these changes. No review comments were provided, so there is no feedback to address.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
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 `@docs/plans/cuda-nvml-startable-listing.md`:
- Line 41: The checklist state is inconsistent with the later verification log,
so update the plan to reflect one clear status. In the markdown plan, either
mark the local subagent code review item as completed or rewrite the follow-up
entries in the verification log so they match the same unresolved/completed
state. Keep the wording aligned around the review status in the checklist and
the later log entries so the plan remains consistent.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 00f5dc82-1433-48ae-91ab-909be08c0bf3
📒 Files selected for processing (11)
AGENTS.mdREADME.mddocs/concepts/architecture.mddocs/guides/cli.mddocs/guides/mcp.mddocs/guides/python.mddocs/plans/cuda-nvml-startable-listing.mddocs/reference/api.mddocs/reference/cli.mdsrc/keep_gpu/utilities/gpu_info.pytests/utilities/test_gpu_info.py
Summary
set_device()probes for each visible ordinal.Test Plan
PYTHONPATH=$PWD/src pytest tests/utilities/test_gpu_info.py -qPYTHONPATH=$PWD/src pytest tests/mcp tests/utilities/test_gpu_info.py -qPYTHONPATH=$PWD/src pytest tests/global_controller tests/utilities/test_gpu_info.py -qPYTHONPATH=$PWD/src pytest tests -qPYTHONPATH=$PWD/src mkdocs buildpre-commit run --all-filesgit diff --checkLocal Review
Summary by CodeRabbit
Bug Fixes
Documentation
Tests