[controllers] fix: defer keep allocation while busy - #94
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughAll three GPU controllers (CUDA, ROCm, MPS) now query utilization and run ChangesDefer Keep-Tensor Allocation While GPU Is Busy
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 docstrings
🧪 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 implements deferred keep-tensor allocation across CUDA, ROCm, and MPS (MacM) controllers, ensuring that VRAM is not allocated when the GPU is busy or telemetry is unavailable. The changes update the keep loops in each controller to check utilization backoff before allocation, add comprehensive unit tests to verify this behavior, and update all relevant documentation. As there are no review comments, I have no feedback to provide.
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.
Summary
busy_threshold=-1as the explicit unconditional allocation/compute modeVerification
PYTHONPATH=$PWD/src pytest tests/rocm_controller/test_rocm_backoff.py -q-> 6 passedPYTHONPATH=$PWD/src pytest tests/cuda_controller/test_throttle.py tests/rocm_controller/test_rocm_backoff.py tests/macm_controller/test_macm_backoff.py -q-> 17 passed, 1 skippedPYTHONPATH=$PWD/src pytest tests/cuda_controller/test_throttle.py tests/rocm_controller/test_rocm_backoff.py tests/macm_controller/test_macm_backoff.py tests/global_controller/global_keep_test.py tests/single_gpu_controller/test_release_contract.py -q-> 27 passed, 2 skippedPYTHONPATH=$PWD/src pytest tests -q-> 263 passed, 11 skippedPYTHONPATH=$PWD/src mkdocs build-> passed with existing Material/nav warningspre-commit run --all-files-> passedgit diff --check && git diff --cached --check-> cleanLocal review
Summary by CodeRabbit
Bug Fixes
-1unconditional mode.Documentation
busy_thresholdbehavior in architecture, CLI, API, and user guide docs.