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

Use MPS backend if available and use_device=None, add CHGNET_DEVICE env var #131

Merged
merged 7 commits into from
Feb 28, 2024

Conversation

janosh
Copy link
Collaborator

@janosh janosh commented Feb 27, 2024

prev would default to CPU in that case. we should default to the fastest hardware available on Mac.

this also ensures we test MPS backend in CI to catch breaking changes as in #130

(prev would default to CPU in that case)
also fix type errors
@janosh janosh added ux User experience performance Performance issues or improvements ci Continuous integration labels Feb 27, 2024
E   RuntimeError: MPS backend out of memory (MPS allocated: 0 bytes, other allocations: 0 bytes, max allowed: 7.93 GB). Tried to allocate 512 bytes on private pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).
@janosh janosh force-pushed the default-device-to-mps-if-avail branch from 81e103e to 7a32890 Compare February 28, 2024 13:14
@janosh janosh changed the title Use MPS backend if available and use_device is None Use MPS backend if available and use_device=None, add CHGNET_DEVICE env var Feb 28, 2024
@janosh janosh changed the title Use MPS backend if available and use_device=None, add CHGNET_DEVICE env var Use MPS backend if available and use_device=None, add CHGNET_DEVICE env var Feb 28, 2024
@janosh janosh merged commit 3bc34b5 into main Feb 28, 2024
6 checks passed
@janosh janosh deleted the default-device-to-mps-if-avail branch February 28, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous integration performance Performance issues or improvements ux User experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant