Conversation
|
👋 Hi x41lakazam! Thank you for contributing to ai-dynamo/nixl. Your PR reviewers will review your contribution then trigger the CI to test your changes. 🚀 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughModified error handling in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
Summary
In the case where UCX is built without CUDA,
ucp_mem_mapsilently succeeds on GPU pointers but misclassify them as host memory.Previously,
nixlUcxContext::memRegonly logged a warning in this case and returned success.This caused agent's
registerMem, making the UCX backend appear fully functional for VRAM — but actual transfers would fail much later inprepXferDlist,makeXferReq, or during the transfer itself, producing confusing errors far from the root cause.This change promotes the warning to an error and makes
memRegfail immediately when VRAM is detected as host memory by UCX. The memory mapping is properly cleaned up (ucp_mem_unmap) before returning.Without this fix, users with a UCX installation lacking CUDA support see the following behavior:
registerMem(VRAM_SEG, ...)succeeds (with only a log warning).The backend appears available for GPU transfers.
Transfer preparation or execution fails with an unrelated error, making the root cause (missing UCX CUDA support) very hard to diagnose.
With this fix,
registerMemfails immediately with a clear error message pointing to the missing UCX CUDA support, allowing callers to gracefully fall back or report the issue at the right time.Summary by CodeRabbit
Bug Fixes