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
5d694650
Commit
5d694650
authored
Apr 17, 2019
by
Ramesh Errabolu
Browse files
Track access to buffers across multiple calls to acquire
parent
fe64704a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
rocm_bandwidth_test.cpp
rocm_bandwidth_test.cpp
+8
-13
No files found.
rocm_bandwidth_test.cpp
View file @
5d694650
...
...
@@ -88,9 +88,10 @@ void RocmBandwidthTest::AcquirePoolAcceses(uint32_t src_dev_idx,
// determine which one is a cpu and call acquire on the other agent
hsa_device_type_t
src_dev_type
=
agent_list_
[
src_dev_idx
].
device_type_
;
hsa_device_type_t
dst_dev_type
=
agent_list_
[
dst_dev_idx
].
device_type_
;
if
(
src_dev_type
==
HSA_DEVICE_TYPE_GPU
)
{
AcquireAccess
(
src_agent
,
dst
);
}
else
{
}
else
if
(
dst_dev_type
==
HSA_DEVICE_TYPE_GPU
)
{
AcquireAccess
(
dst_agent
,
src
);
}
...
...
@@ -319,13 +320,6 @@ void RocmBandwidthTest::RunCopyBenchmark(async_trans_t& trans) {
hsa_signal_store_relaxed
(
signal_start_bidir
,
1
);
}
if
(
validate_
)
{
AcquirePoolAcceses
(
src_dev_idx_fwd
,
src_agent_fwd
,
buf_src_fwd
,
dst_dev_idx_fwd
,
dst_agent_fwd
,
buf_dst_fwd
);
}
// Create a timer object and reset signals
PerfTimer
timer
;
uint32_t
index
=
timer
.
CreateTimer
();
...
...
@@ -400,11 +394,6 @@ void RocmBandwidthTest::RunCopyBenchmark(async_trans_t& trans) {
if
(
validate_
)
{
// Re-Establish access to destination buffer and host buffer
AcquirePoolAcceses
(
dst_dev_idx_fwd
,
dst_agent_fwd
,
buf_dst_fwd
,
cpu_index_
,
cpu_agent_
,
validation_dst
);
// Init dst buffer with values from outbuffer of copy operation
hsa_signal_store_relaxed
(
validation_signal
,
1
);
copy_buffer
(
validation_dst
,
cpu_agent_
,
...
...
@@ -450,6 +439,12 @@ void RocmBandwidthTest::RunCopyBenchmark(async_trans_t& trans) {
ReleaseBuffers
(
false
,
validation_src
,
NULL
,
validation_dst
,
NULL
,
validation_signal
,
fake_signal
);
}
// Free signal used to sync bidirectional copies
if
(
bidir
)
{
err_
=
hsa_signal_destroy
(
signal_start_bidir
);
ErrorCheck
(
err_
);
}
}
void
RocmBandwidthTest
::
Run
()
{
...
...
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