Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CUDA device mismatch #371

Merged
merged 1 commit into from
Apr 17, 2023
Merged

Fix CUDA device mismatch #371

merged 1 commit into from
Apr 17, 2023

Conversation

ycremar
Copy link
Contributor

@ycremar ycremar commented Apr 10, 2023

When using GPU devices other than "cuda" or "cuda:0", calling the loss will raise a device mismatch error. The change makes the devices for zero or target tensors consistent with inputs.

Making devices for zero or target tensors consistent with inputs.

Signed-off-by: Yaochen Xie <ethanycx@tamu.edu>
@marksgraham
Copy link
Collaborator

Thanks @ycremar looks good!

@marksgraham marksgraham merged commit 4aee21a into Project-MONAI:main Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants