simplify get_device.

This commit is contained in:
Seunghoon Lee
2023-07-15 19:03:10 +09:00
parent 0a52c44e73
commit 6b4b863fd0
13 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -4,5 +4,5 @@ import torch
rDevice = torch.device | int
def get_device(device: Optional[rDevice]=None) -> torch.device:
if device is None:
device = torch.dml.context_device or torch.dml.current_device()
device = torch.dml.current_device()
return torch.device(device)
+1 -1
Submodule wiki updated: fea0bd7d59...d420606fc4