Skip to content

Commit

Permalink
增加windows 实现 (#671)
Browse files Browse the repository at this point in the history
增加Windows CPU信息获取
  • Loading branch information
fangyinc authored Oct 13, 2023
2 parents f1bb53f + 300b01a commit 867c2f2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pilot/utils/system_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,14 @@ def get_cpu_info():
except:
pass
elif os_type == OSType.WINDOWS:
# TODO
raise NotImplementedError
try:
output = subprocess.check_output("wmic cpu get Name", shell=True).decode(
"utf-8"
)
lines = output.splitlines()
cpu_info = lines[2].split(":")[-1].strip()
except:
pass

return os_type, avx_type, cpu_info, distribution

Expand Down

0 comments on commit 867c2f2

Please sign in to comment.