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 the GPU device, and setting q="nsf" with num_dim=1, sampling from q leads to NaNs.

To Reproduce
To reproduce the issue, follow these steps:

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

Expected behavior
Sampling from q should not result in NaNs.

Additional context
This issue is specific to the MPS device and does not occur on the CPU. It may be related to or blocked by this PyTorch issue: pytorch/pytorch#89127.

Note
Testing on a Mac is required due to MPS device dependency.
This might be fixed on more recent versions and needs to be tested

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