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
f57d86f4
Commit
f57d86f4
authored
Apr 15, 2026
by
one
Browse files
Update GPU vendors
parent
49a4389b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
3 deletions
+17
-3
superbench/benchmarks/micro_benchmarks/ib_validation_performance.py
.../benchmarks/micro_benchmarks/ib_validation_performance.py
+1
-1
superbench/common/utils/device_manager.py
superbench/common/utils/device_manager.py
+2
-2
superbench/tools/system_info.py
superbench/tools/system_info.py
+9
-0
tests/benchmarks/micro_benchmarks/test_ib_traffic_performance.py
...enchmarks/micro_benchmarks/test_ib_traffic_performance.py
+5
-0
No files found.
superbench/benchmarks/micro_benchmarks/ib_validation_performance.py
View file @
f57d86f4
...
...
@@ -282,7 +282,7 @@ class IBBenchmark(MicroBenchmarkWithInvoke):
gpu
=
GPU
()
if
gpu
.
vendor
==
'nvidia'
:
gpu_dev
=
f
'--use_cuda=
{
self
.
_args
.
gpu_dev
}
'
elif
gpu
.
vendor
==
'amd'
:
elif
gpu
.
vendor
==
'amd'
or
gpu
.
vendor
==
'hygon'
:
gpu_dev
=
f
'--use_rocm=
{
self
.
_args
.
gpu_dev
}
'
else
:
self
.
_result
.
set_return_code
(
ReturnCode
.
INVALID_ARGUMENT
)
...
...
superbench/common/utils/device_manager.py
View file @
f57d86f4
...
...
@@ -12,7 +12,7 @@ from superbench.common.devices import GPU
gpu
=
GPU
()
if
gpu
.
vendor
==
'nvidia'
or
gpu
.
vendor
==
'nvidia-graphics'
:
import
py3nvml.py3nvml
as
nvml
elif
gpu
.
vendor
==
'amd'
or
gpu
.
vendor
==
'amd-graphics'
:
elif
gpu
.
vendor
==
'amd'
or
gpu
.
vendor
==
'amd-graphics'
or
gpu
.
vendor
==
'hygon'
:
import
amdsmi
as
rocml
...
...
@@ -456,5 +456,5 @@ class AmdDeviceManager(DeviceManager):
device_manager
:
Optional
[
DeviceManager
]
=
DeviceManager
()
if
gpu
.
vendor
==
'nvidia'
or
gpu
.
vendor
==
'nvidia-graphics'
:
device_manager
=
NvidiaDeviceManager
()
elif
gpu
.
vendor
==
'amd'
or
gpu
.
vendor
==
'amd-graphics'
:
elif
gpu
.
vendor
==
'amd'
or
gpu
.
vendor
==
'amd-graphics'
or
gpu
.
vendor
==
'hygon'
:
device_manager
=
AmdDeviceManager
()
superbench/tools/system_info.py
View file @
f57d86f4
...
...
@@ -286,6 +286,13 @@ class SystemInfo(): # pragma: no cover
return
gpu_dict
def
get_gpu_hygon
(
self
):
"""Get hygon gpu info."""
gpu_dict
=
self
.
get_gpu_amd
()
if
gpu_dict
:
gpu_dict
[
'accelerator_vendor'
]
=
'hygon'
return
gpu_dict
def
get_gpu
(
self
):
"""Get gpu info and identify gpu type(nvidia/amd).
...
...
@@ -296,6 +303,8 @@ class SystemInfo(): # pragma: no cover
if
Path
(
'/dev/nvidiactl'
).
is_char_device
()
and
Path
(
'/dev/nvidia-uvm'
).
is_char_device
():
return
self
.
get_gpu_nvidia
()
if
Path
(
'/dev/kfd'
).
is_char_device
()
and
Path
(
'/dev/dri'
).
is_dir
():
if
Path
(
'/usr/local/hyhal'
).
exists
()
or
Path
(
'/opt/hyhal'
).
exists
():
return
self
.
get_gpu_hygon
()
return
self
.
get_gpu_amd
()
except
Exception
:
logger
.
exception
(
'Error: get gpu info failed'
)
...
...
tests/benchmarks/micro_benchmarks/test_ib_traffic_performance.py
View file @
f57d86f4
...
...
@@ -224,6 +224,11 @@ class IBBenchmarkTest(BenchmarkTestCase, unittest.TestCase):
expect_command
=
expect_command
.
replace
(
'cuda'
,
'rocm'
)
command
=
benchmark
.
_bin_name
+
benchmark
.
_commands
[
0
].
split
(
benchmark
.
_bin_name
)[
1
]
assert
(
command
==
expect_command
)
mock_gpu
.
return_value
=
'hygon'
benchmark
=
benchmark_class
(
benchmark_name
,
parameters
=
parameters
)
ret
=
benchmark
.
_preprocess
()
command
=
benchmark
.
_bin_name
+
benchmark
.
_commands
[
0
].
split
(
benchmark
.
_bin_name
)[
1
]
assert
(
command
==
expect_command
)
parameters
=
'--command ib_read_lat --ib_dev mlx5_0 --iters 2000 --msg_size 33554432 '
+
\
'--pattern one-to-one --hostfile hostfile --gpu_dev 0 --direction gpu-to-gpu'
...
...
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