Skip to content

Commit

Permalink
type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Zuegner committed Jan 22, 2025
1 parent 716f52d commit 20e0680
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mattergen/common/utils/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


@lru_cache
def get_device():
def get_device() -> torch.device:
if torch.cuda.is_available():
return torch.device("cuda")
if torch.backends.mps.is_available():
Expand All @@ -23,7 +23,7 @@ def get_device():


@lru_cache
def get_pyg_device():
def get_pyg_device() -> torch.device:
"""
Some operations of pyg don't work on MPS, so fall back to CPU.
"""
Expand Down

0 comments on commit 20e0680

Please sign in to comment.