Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
rocm_bandwidth_test
Commits
6e2e6e7f
Commit
6e2e6e7f
authored
Mar 05, 2020
by
Ramesh Errabolu
Browse files
Print the list of enabled ROCm devices
parent
1935cf86
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
10 deletions
+32
-10
rocm_bandwidth_test.cpp
rocm_bandwidth_test.cpp
+1
-1
rocm_bandwidth_test.hpp
rocm_bandwidth_test.hpp
+9
-7
rocm_bandwidth_test_parse.cpp
rocm_bandwidth_test_parse.cpp
+21
-2
rocm_bandwidth_test_print.cpp
rocm_bandwidth_test_print.cpp
+1
-0
No files found.
rocm_bandwidth_test.cpp
View file @
6e2e6e7f
...
@@ -804,7 +804,7 @@ RocmBandwidthTest::RocmBandwidthTest(int argc, char** argv) : BaseTest() {
...
@@ -804,7 +804,7 @@ RocmBandwidthTest::RocmBandwidthTest(int argc, char** argv) : BaseTest() {
// Initialize version of the test
// Initialize version of the test
version_
.
major_id
=
2
;
version_
.
major_id
=
2
;
version_
.
minor_id
=
3
;
version_
.
minor_id
=
3
;
version_
.
step_id
=
1
0
;
version_
.
step_id
=
1
1
;
version_
.
reserved
=
0
;
version_
.
reserved
=
0
;
bw_iter_cnt_
=
getenv
(
"ROCM_BW_ITER_CNT"
);
bw_iter_cnt_
=
getenv
(
"ROCM_BW_ITER_CNT"
);
...
...
rocm_bandwidth_test.hpp
View file @
6e2e6e7f
...
@@ -168,13 +168,14 @@ typedef enum Request_Type {
...
@@ -168,13 +168,14 @@ typedef enum Request_Type {
REQ_WRITE
=
2
,
REQ_WRITE
=
2
,
REQ_VERSION
=
3
,
REQ_VERSION
=
3
,
REQ_TOPOLOGY
=
4
,
REQ_TOPOLOGY
=
4
,
REQ_COPY_BIDIR
=
5
,
REQ_LIST_DEVS
=
5
,
REQ_COPY_UNIDIR
=
6
,
REQ_COPY_BIDIR
=
6
,
REQ_COPY_ALL_BIDIR
=
7
,
REQ_COPY_UNIDIR
=
7
,
REQ_COPY_ALL_UNIDIR
=
8
,
REQ_COPY_ALL_BIDIR
=
8
,
REQ_CONCURRENT_COPY_BIDIR
=
9
,
REQ_COPY_ALL_UNIDIR
=
9
,
REQ_CONCURRENT_COPY_UNIDIR
=
10
,
REQ_CONCURRENT_COPY_BIDIR
=
10
,
REQ_INVALID
=
11
,
REQ_CONCURRENT_COPY_UNIDIR
=
11
,
REQ_INVALID
=
12
,
}
Request_Type
;
}
Request_Type
;
...
@@ -446,6 +447,7 @@ class RocmBandwidthTest : public BaseTest {
...
@@ -446,6 +447,7 @@ class RocmBandwidthTest : public BaseTest {
uint32_t
req_write_
;
uint32_t
req_write_
;
uint32_t
req_version_
;
uint32_t
req_version_
;
uint32_t
req_topology_
;
uint32_t
req_topology_
;
uint32_t
req_list_devs_
;
uint32_t
req_copy_bidir_
;
uint32_t
req_copy_bidir_
;
uint32_t
req_copy_unidir_
;
uint32_t
req_copy_unidir_
;
uint32_t
req_copy_all_bidir_
;
uint32_t
req_copy_all_bidir_
;
...
...
rocm_bandwidth_test_parse.cpp
View file @
6e2e6e7f
...
@@ -222,6 +222,12 @@ void RocmBandwidthTest::ValidateInputFlags(uint32_t pf_cnt,
...
@@ -222,6 +222,12 @@ void RocmBandwidthTest::ValidateInputFlags(uint32_t pf_cnt,
return
;
return
;
}
}
// Input is requesting to print list of devices
// rocm_bandwidth_test -e
if
(
req_list_devs_
==
REQ_LIST_DEVS
)
{
return
;
}
// Input is for bidirectional bandwidth for some devices
// Input is for bidirectional bandwidth for some devices
// rocm_bandwidth_test -b
// rocm_bandwidth_test -b
if
(
req_copy_bidir_
==
REQ_COPY_BIDIR
)
{
if
(
req_copy_bidir_
==
REQ_COPY_BIDIR
)
{
...
@@ -336,7 +342,7 @@ void RocmBandwidthTest::ParseArguments() {
...
@@ -336,7 +342,7 @@ void RocmBandwidthTest::ParseArguments() {
int
opt
;
int
opt
;
bool
status
;
bool
status
;
while
((
opt
=
getopt
(
usr_argc_
,
usr_argv_
,
"hqtclvaAb:i:s:d:r:w:m:k:K:"
))
!=
-
1
)
{
while
((
opt
=
getopt
(
usr_argc_
,
usr_argv_
,
"hqt
e
clvaAb:i:s:d:r:w:m:k:K:"
))
!=
-
1
)
{
switch
(
opt
)
{
switch
(
opt
)
{
// Print help screen
// Print help screen
...
@@ -350,6 +356,12 @@ void RocmBandwidthTest::ParseArguments() {
...
@@ -350,6 +356,12 @@ void RocmBandwidthTest::ParseArguments() {
req_version_
=
REQ_VERSION
;
req_version_
=
REQ_VERSION
;
break
;
break
;
// Print list of devices
case
'e'
:
num_primary_flags
++
;
req_list_devs_
=
REQ_LIST_DEVS
;
break
;
// Print system topology
// Print system topology
case
't'
:
case
't'
:
num_primary_flags
++
;
num_primary_flags
++
;
...
@@ -508,7 +520,14 @@ void RocmBandwidthTest::ParseArguments() {
...
@@ -508,7 +520,14 @@ void RocmBandwidthTest::ParseArguments() {
// Discover the topology of RocR agent in system
// Discover the topology of RocR agent in system
DiscoverTopology
();
DiscoverTopology
();
// Print system topology if user option has "-t"
// Print list of devices if user option is "-e"
if
(
req_list_devs_
==
REQ_LIST_DEVS
)
{
PrintVersion
();
PrintTopology
();
exit
(
0
);
}
// Print system topology if user option is "-t"
if
(
req_topology_
==
REQ_TOPOLOGY
)
{
if
(
req_topology_
==
REQ_TOPOLOGY
)
{
PrintVersion
();
PrintVersion
();
PrintTopology
();
PrintTopology
();
...
...
rocm_bandwidth_test_print.cpp
View file @
6e2e6e7f
...
@@ -59,6 +59,7 @@ void RocmBandwidthTest::PrintHelpScreen() {
...
@@ -59,6 +59,7 @@ void RocmBandwidthTest::PrintHelpScreen() {
std
::
cout
<<
"
\t
-v Run the test in validation mode"
<<
std
::
endl
;
std
::
cout
<<
"
\t
-v Run the test in validation mode"
<<
std
::
endl
;
std
::
cout
<<
"
\t
-l Run test to collect Latency data"
<<
std
::
endl
;
std
::
cout
<<
"
\t
-l Run test to collect Latency data"
<<
std
::
endl
;
std
::
cout
<<
"
\t
-c Time the operation using CPU Timers"
<<
std
::
endl
;
std
::
cout
<<
"
\t
-c Time the operation using CPU Timers"
<<
std
::
endl
;
std
::
cout
<<
"
\t
-e Prints the list of ROCm devices enabled on platform"
<<
std
::
endl
;
std
::
cout
<<
"
\t
-i Initialize copy buffer with specified 'long double' pattern"
<<
std
::
endl
;
std
::
cout
<<
"
\t
-i Initialize copy buffer with specified 'long double' pattern"
<<
std
::
endl
;
std
::
cout
<<
"
\t
-t Prints system topology and allocatable memory info"
<<
std
::
endl
;
std
::
cout
<<
"
\t
-t Prints system topology and allocatable memory info"
<<
std
::
endl
;
std
::
cout
<<
"
\t
-m List of buffer sizes to use, specified in Megabytes"
<<
std
::
endl
;
std
::
cout
<<
"
\t
-m List of buffer sizes to use, specified in Megabytes"
<<
std
::
endl
;
...
...
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