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 autodetermination of plate device when running in a device contexf #3405

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

ilia-kats
Copy link
Contributor

Apparently, the torch.Tensor() constructor ignores device contexts, e.g. running

with torch.device("cuda"):
    print(torch.Tensor().device)

still returns cpu.

@ilia-kats
Copy link
Contributor Author

The CI is failing in files that this PR does not touch. Let me know if I should still fix it.

@ordabayevy
Copy link
Member

Thanks for the fix! Could you merge the dev branch that should fix the CI errors.

Apparently, the torch.Tensor() constructor ignores device contexts
@ordabayevy ordabayevy merged commit ff6ae1c into pyro-ppl:dev Oct 24, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants