Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix/gpu-driver #681

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,5 @@ ignore = []
# black配置,与构建无关
[tool.black]
line-length = 120
skip-string-normalization = true

6 changes: 5 additions & 1 deletion swanlab/data/run/system/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ def __get_nvidia_gpu_info():

try:
# 获取 NVIDIA 驱动版本信息
info["driver"] = pynvml.nvmlSystemGetDriverVersion()
nv_driver = pynvml.nvmlSystemGetDriverVersion()
if isinstance(nv_driver, bytes):
nv_driver = nv_driver.decode("utf-8")
info["driver"] = nv_driver

# 获取 NVIDIA GPU 数量
info["cores"] = pynvml.nvmlDeviceGetCount()
# 遍历每个 GPU,获取 GPU 信息
Expand Down