Skip to content

Commit 81fb432

Browse files
MassEastRRobert92
authored andcommitted
Support 'cuda' as an alias for 'gpu' device
Signed-off-by: derjustus <72736286+MassEast@users.noreply.github.com>
1 parent 0f910c1 commit 81fb432

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tardis_em/utils/device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def get_device(device: Union[str, list, tuple] = "0") -> torch.device:
3535
"""
3636
device_ = None
3737

38-
if device == "gpu": # Load GPU ID 0
38+
if device in ["gpu", "cuda"]: # Load GPU ID 0
3939
if torch.cuda.is_available():
4040
device_ = torch.device("cuda:0")
4141
else:

0 commit comments

Comments
 (0)