Format code (#1076)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-08-27 00:21:33 +08:00
committed by GitHub
parent ef738704d0
commit 64ac09bf66
2 changed files with 55 additions and 52 deletions

View File

@@ -92,7 +92,8 @@ class Config:
self.gpu_name = torch.cuda.get_device_name(i_device)
if (
("16" in self.gpu_name and "V100" not in self.gpu_name.upper())
or "P40" in self.gpu_name.upper()or "P10" in self.gpu_name.upper()
or "P40" in self.gpu_name.upper()
or "P10" in self.gpu_name.upper()
or "1060" in self.gpu_name
or "1070" in self.gpu_name
or "1080" in self.gpu_name
@@ -168,9 +169,9 @@ class Config:
)
except:
pass
if(self.device!="cpu"):
if self.device != "cpu":
import torch_directml
self.device = torch_directml.device(torch_directml.default_device())
self.is_half = False
else: