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 tests when PyTorch built with MPS support #1188

Merged
merged 1 commit into from
Mar 22, 2023
Merged

Fix tests when PyTorch built with MPS support #1188

merged 1 commit into from
Mar 22, 2023

Conversation

adamjstewart
Copy link
Collaborator

Starting with Lightning 2.0, Trainer now defaults to accelerator="auto", meaning it searches to see if any GPU/MPS device is available. While this works fine with CUDA, the MPS backend is still missing implementations of many operators, so the tests will fail. We should force the tests to use the CPU to ensure that they always pass, even on macOS. We don't see this issue in CI because the GitHub runner is an old x86_64 Mac and doesn't support MPS.

@adamjstewart adamjstewart added this to the 0.4.1 milestone Mar 22, 2023
@github-actions github-actions bot added the testing Continuous integration testing label Mar 22, 2023
@calebrob6 calebrob6 merged commit e9113e3 into main Mar 22, 2023
@calebrob6 calebrob6 deleted the tests/mps branch March 22, 2023 12:26
yichiac pushed a commit to yichiac/torchgeo that referenced this pull request Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Continuous integration testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants