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

lightning throws an exception on MacOS when the pytorch default device is set #20696

Open
reductionnist opened this issue Apr 4, 2025 · 0 comments
Labels
bug Something isn't working needs triage Waiting to be triaged by maintainers ver: 2.5.x

Comments

@reductionnist
Copy link

reductionnist commented Apr 4, 2025

Bug description

If you set the pytorch default device to 'mps' on MacOS, pytorch lightning throws an exception on import.

The expected result is to not throw an exception and also to use the pytorch default device when doing computation.

What version are you seeing the problem on?

v2.5.1

How to reproduce the bug

import torch
torch.set_default_device('mps')
import pytorch_lightning as pl

Error messages and logs

RuntimeError: Placeholder storage has not been allocated on MPS device!

Environment

Current environment
#- PyTorch Lightning Version (e.g., 2.5.0): 2.5.1
#- PyTorch Version (e.g., 2.5): 2.6.0
#- Python version (e.g., 3.12): 3.12.9
#- OS (e.g., Linux): MacOS 15.3.2
#- CUDA/cuDNN version:
#- GPU models and configuration: M1 Max
#- How you installed Lightning(`conda`, `pip`, source): uv

More info

No response

@reductionnist reductionnist added bug Something isn't working needs triage Waiting to be triaged by maintainers labels Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Waiting to be triaged by maintainers ver: 2.5.x
Projects
None yet
Development

No branches or pull requests

1 participant