You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Potentially wrong device using_cuda variable status in monai/auto3dseg/analyzer.py #8800
We set the label_tensor device to the device of the image_tensor here, but we already determined whether cuda is set or not (using_cuda) above by checking whether any of both tensors uses cuda. So in case we got label_tensor to use cuda and image_tensor not, then we would first set using_cuda to True, but then we check whether if label_tensor.device is != image_tensor.device which is True and therefore we set the device of label_tensor to non-cuda (e.g. cpu) which means that now both tensors use cpu while using_cuda is still wrongly set to True.
(see the detailed explaination in #8708, I just opened this issue here so that we don't forget about this since #8708 is already merged, but still got this potential issue open)
Activity
garciadias commentedon Apr 2, 2026
I will create the PR now.
benediktjohannes commentedon Apr 2, 2026
Thank you for doing this!
8800 potentially wrong device using cuda variable status in monaiauto…
8800 potentially wrong device using cuda variable status in monaiauto…