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

VIPosterior with device="mps" fails for "nsf" #948

Open
janfb opened this issue Feb 16, 2024 · 0 comments
Open

VIPosterior with device="mps" fails for "nsf" #948

janfb opened this issue Feb 16, 2024 · 0 comments
Labels
blocked Something is in the way of fixing this. Refer to it in the issue bug Something isn't working

Comments

@janfb
Copy link
Contributor

janfb commented Feb 16, 2024

Describe the bug
When using VIPosterior with "mps" as GPU device, and using q="nsf", and num_dim=1, then sampling from q will result in NaNs.

To Reproduce
Please add a minimal code example that reproduces the problem:

  1. Python 3.11, SBI 0.22.0
  2. On MacOS with MPS enabled, run pytest tests/inference_on_device_test.py::test_vi_on_gpu

Expected behavior
Sampling q should not result in NaNs.

Additional context
This issue occurs only on the MPS device and not on the CPU.
Might be related to / blocked by this PyTorch issue: pytorch/pytorch#89127

see also #912

@janfb janfb added bug Something isn't working blocked Something is in the way of fixing this. Refer to it in the issue labels Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Something is in the way of fixing this. Refer to it in the issue bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant