Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
superbenchmark
Commits
66e56f20
Commit
66e56f20
authored
May 15, 2026
by
one
Browse files
Get GPU driver version
parent
fb44b646
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
superbench/tools/system_info.py
superbench/tools/system_info.py
+18
-0
No files found.
superbench/tools/system_info.py
View file @
66e56f20
...
@@ -307,6 +307,19 @@ class SystemInfo(): # pragma: no cover
...
@@ -307,6 +307,19 @@ class SystemInfo(): # pragma: no cover
gpu_info
[
card
][
key
]
=
value
gpu_info
[
card
][
key
]
=
value
return
gpu_info
return
gpu_info
def
_get_hygon_driver_version
(
self
):
"""Get Hygon GPU driver version from hy-smi text output.
Returns:
str: Hygon GPU driver version.
"""
output
=
self
.
_run_cmd
(
'hy-smi --showdriverversion'
)
for
line
in
output
.
splitlines
():
key
,
separator
,
value
=
line
.
partition
(
':'
)
if
separator
and
key
.
strip
()
==
'Driver Version'
:
return
value
.
strip
()
return
''
def
get_gpu_hygon
(
self
):
def
get_gpu_hygon
(
self
):
"""Get hygon gpu info."""
"""Get hygon gpu info."""
gpu_dict
=
{
gpu_dict
=
{
...
@@ -350,6 +363,11 @@ class SystemInfo(): # pragma: no cover
...
@@ -350,6 +363,11 @@ class SystemInfo(): # pragma: no cover
except
Exception
:
except
Exception
:
logger
.
exception
(
'Error: get hygon gpu topology info failed'
)
logger
.
exception
(
'Error: get hygon gpu topology info failed'
)
try
:
gpu_dict
[
'driver_version'
]
=
self
.
_get_hygon_driver_version
()
except
Exception
:
logger
.
exception
(
'Error: get hygon gpu driver version failed'
)
gpu_dict
[
'gpu_count'
]
=
len
(
gpu_dict
[
'rocm_info'
])
gpu_dict
[
'gpu_count'
]
=
len
(
gpu_dict
[
'rocm_info'
])
return
gpu_dict
return
gpu_dict
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment