-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use MPS backend if available and
use_device=None
, add `CHGNET_DEVIC…
…E` env var (#131) * use MPS backend if available and use_device is None (prev would default to CPU in that case) also fix type errors * revert torch.det for volume to torch.dot and torch.cross (which have MPS support) * try PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 in CI to avoid OOM error 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). * add support for CHGNET_DEVICE environment variable * test CHGNET_DEVICE in test_model_load_version_params() update deprecated ruff lint config * set CHGNET_DEVICE=cpu in test.yml since no MPS hardware available even on macos-14 runners pytorch/pytorch#111449 (comment) * fix setting CHGNET_DEVICE env var on windows
- Loading branch information
Showing
5 changed files
with
38 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters