Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 6ed3cda

Browse files
committed
update
1 parent 7c4e42b commit 6ed3cda

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

torchchat/cli/builder.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,9 @@ class BuilderArgs:
6868

6969
def __post_init__(self):
7070
if self.device is None:
71-
# self.device = "cuda" if torch.cuda.is_available() else "cpu"
7271
if torch.cuda.is_available():
7372
self.device = "cuda"
74-
elif hasattr(torch, 'xpu') and torch.xpu.is_available():
73+
elif torch.xpu.is_available():
7574
self.device = "xpu"
7675
else:
7776
self.device = "cpu"

torchchat/utils/device_info.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@ def get_device_info(device: str) -> str:
3838
if device == "cuda":
3939
return torch.cuda.get_device_name(0)
4040
if device == "xpu":
41-
# return (
42-
# check_output(
43-
# ["sycl-ls | grep gpu"], shell=True
44-
# )
45-
# .decode("utf-8")
46-
# .split("\n")[0]
47-
# )
4841
return (
4942
check_output(
5043
["xpu-smi discovery |grep 'Device Name:'"], shell=True

0 commit comments

Comments
 (0)