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
1c93dc06
Commit
1c93dc06
authored
Feb 06, 2018
by
Ramesh Errabolu
Browse files
Report Numa distance as N/A when a pool is inaccessible
parent
5f25d0e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
rocm_bandwidth_test_print.cpp
rocm_bandwidth_test_print.cpp
+5
-1
rocm_bandwidth_test_topology.cpp
rocm_bandwidth_test_topology.cpp
+9
-4
No files found.
rocm_bandwidth_test_print.cpp
View file @
1c93dc06
...
...
@@ -201,7 +201,11 @@ void RocmBandwidthTest::PrintLinkMatrix() const {
for
(
uint32_t
dst_idx
=
0
;
dst_idx
<
agent_index_
;
dst_idx
++
)
{
uint32_t
link_weight
=
link_matrix_
[(
src_idx
*
agent_index_
)
+
dst_idx
];
std
::
cout
.
width
(
format
);
std
::
cout
<<
link_weight
;
if
(
link_weight
==
0xFFFFFFFF
)
{
std
::
cout
<<
"N/A"
;
}
else
{
std
::
cout
<<
link_weight
;
}
}
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
...
...
rocm_bandwidth_test_topology.cpp
View file @
1c93dc06
...
...
@@ -279,21 +279,26 @@ void RocmBandwidthTest::DiscoverLinkWeight() {
agent_info_t
agent_info
;
hsa_agent_t
agent1
;
hsa_agent_t
agent2
;
hsa_amd_memory_pool_link_info_t
link_info
=
{
0
};
for
(
uint32_t
idx1
=
0
;
idx1
<
agent_index_
;
idx1
++
)
{
agent1
=
agent_list_
[
idx1
].
agent_
;
agent1
=
agent_list_
[
idx1
].
agent_
;
for
(
uint32_t
idx2
=
0
;
idx2
<
agent_index_
;
idx2
++
)
{
if
(
idx1
==
idx2
)
{
link_matrix_
[(
idx1
*
agent_index_
)
+
idx2
]
=
0
;
continue
;
}
uint32_t
hops
=
0
;
if
(
agent_pool_list_
[
idx2
].
pool_list
.
size
()
!=
0
)
{
hsa_amd_memory_pool_t
&
pool
=
agent_pool_list_
[
idx2
].
pool_list
[
0
].
pool_
;
agent2
=
agent_pool_list_
[
idx2
].
agent
.
agent_
;
err_
=
hsa_amd_agent_memory_pool_get_info
(
agent1
,
pool
,
HSA_AMD_AGENT_MEMORY_POOL_INFO_NUM_LINK_HOPS
,
&
hops
);
if
(
hops
>
0
)
{
err_
=
hsa_amd_agent_memory_pool_get_info
(
agent1
,
pool
,
HSA_AMD_AGENT_MEMORY_POOL_INFO_LINK_INFO
,
&
link_info
);
link_matrix_
[(
idx1
*
agent_index_
)
+
idx2
]
=
link_info
.
numa_distance
;
link_matrix_
[(
idx1
*
agent_index_
)
+
idx2
]
=
link_info
.
numa_distance
;
}
else
{
link_matrix_
[(
idx1
*
agent_index_
)
+
idx2
]
=
0xFFFFFFFF
;
}
}
}
}
...
...
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