8800 potentially wrong device using cuda variable status in monaiauto3dseganalyzerpy#8801
Conversation
Signed-off-by: R. Garcia-Dias <rafaelagd@gmail.com>
…ing_cuda-variable-status-in-monaiauto3dseganalyzerpy' into 8800-potentially-wrong-device-using_cuda-variable-status-in-monaiauto3dseganalyzerpy
… the CUDA device when mix of GPU and CPU Signed-off-by: R. Garcia-Dias <rafaelagd@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdjusted device-handling in 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. ✨ 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 |
I, R. Garcia-Dias <rafaelagd@gmail.com>, hereby add my Signed-off-by to this commit: ba56a6d Signed-off-by: R. Garcia-Dias <rafaelagd@gmail.com>
benediktjohannes
left a comment
There was a problem hiding this comment.
Overall LGTM, just one question
|
And thanks for addressing this! |
|
And we need to address lint please |
benediktjohannes
left a comment
There was a problem hiding this comment.
Approving this (only Lint fix left, but in General LGTM, thanks)!
|
I don‘t have permissions to approve / merge, so could you please do this @ericspod? Thanks! |
ericspod
left a comment
There was a problem hiding this comment.
I think this looks good now, you can fix your DCO issue with a remedial commit or I just mark it passed.
Thanks! |
|
Great work, keep it up! 👍 |
|
And thank you for helping out so quick, very nice! I've worked for several other projects which took way longer for those things, so very nice that you directly addressed this, thank you! |
Fixes #8800.
Description
Fix bug introduced by me on @benediktjohannes' PR#8708
Fixed a device synchronization bug in
LabelStats.__call__()where theusing_cudawas being ignored. When image and label tensors were on different devices, the code would:using_cudato True if one is on GPUNow
using_cudais calculated, and when devices don't match, both tensors are moved to CUDA (when either is on CUDA) or CPU otherwise.Replaced
# type: ignorecomments with propercast()for type safety.Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.