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
389f67cc
Commit
389f67cc
authored
Aug 21, 2019
by
Ramesh Errabolu
Browse files
Fix RBT to allow Fine grain regions to be reported by GPU devices
parent
945a8bef
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
12 deletions
+30
-12
cmake_modules/utils.cmake
cmake_modules/utils.cmake
+5
-2
rocm_bandwidth_test.cpp
rocm_bandwidth_test.cpp
+3
-2
rocm_bandwidth_test.hpp
rocm_bandwidth_test.hpp
+2
-1
rocm_bandwidth_test_topology.cpp
rocm_bandwidth_test_topology.cpp
+19
-6
rocm_bandwidth_test_trans.cpp
rocm_bandwidth_test_trans.cpp
+1
-1
No files found.
cmake_modules/utils.cmake
View file @
389f67cc
...
...
@@ -99,7 +99,10 @@ function( parse_version VERSION_STRING )
endif
()
# Add Build Info from Jenkins
set
(
ROCM_BUILD_ID
"DevBld"
CACHE STRING
"Jenkins Build Id"
)
set
(
ROCM_BUILD_ID
"DevBld"
CACHE STRING
"Local Build Id"
FORCE
)
if
(
DEFINED ENV{ROCM_BUILD_ID}
)
set
(
ROCM_BUILD_ID $ENV{ROCM_BUILD_ID} CACHE STRING
"Jenkins Build Id"
FORCE
)
endif
()
# Update Version Patch to include Number of Commits and hash of HEAD
set
(
VERSION_PATCH
"
${
PATCH
}
.
${
COMMIT_CNT
}
-
${
ROCM_BUILD_ID
}
-
${
COMMIT_HASH
}
"
PARENT_SCOPE
)
...
...
rocm_bandwidth_test.cpp
View file @
389f67cc
...
...
@@ -789,13 +789,14 @@ RocmBandwidthTest::RocmBandwidthTest(int argc, char** argv) : BaseTest() {
// Initialize version of the test
version_
.
major_id
=
2
;
version_
.
minor_id
=
3
;
version_
.
step_id
=
3
;
version_
.
step_id
=
4
;
version_
.
reserved
=
0
;
bw_iter_cnt_
=
getenv
(
"ROCM_BW_ITER_CNT"
);
bw_default_run_
=
getenv
(
"ROCM_BW_DEFAULT_RUN"
);
bw_blocking_run_
=
getenv
(
"ROCR_BW_RUN_BLOCKING"
);
skip_fine_grain_
=
getenv
(
"ROCM_SKIP_FINE_GRAINED_POOL"
);
skip_cpu_fine_grain_
=
getenv
(
"ROCM_SKIP_CPU_FINE_GRAINED_POOL"
);
skip_gpu_coarse_grain_
=
getenv
(
"ROCM_SKIP_GPU_COARSE_GRAINED_POOL"
);
if
(
bw_iter_cnt_
!=
NULL
)
{
int32_t
num
=
atoi
(
bw_iter_cnt_
);
...
...
rocm_bandwidth_test.hpp
View file @
389f67cc
...
...
@@ -488,7 +488,8 @@ class RocmBandwidthTest : public BaseTest {
// Env key to determine if Fine-grained or
// Coarse-grained pool should be filtered out
char
*
skip_fine_grain_
;
char
*
skip_cpu_fine_grain_
;
char
*
skip_gpu_coarse_grain_
;
// Env key to determine if the run should block
// or actively wait on completion signal
...
...
rocm_bandwidth_test_topology.cpp
View file @
389f67cc
...
...
@@ -106,10 +106,11 @@ hsa_status_t MemPoolInfo(hsa_amd_memory_pool_t pool, void* data) {
}
// Consult user request and add either fine-grained or
// coarse-grained memory pools if agent is CPU
// coarse-grained memory pools if agent is CPU. Default
// is to skip coarse-grained memory pools
agent_info_t
&
agent_info
=
asyncDrvr
->
agent_list_
.
back
();
if
(
agent_info
.
device_type_
==
HSA_DEVICE_TYPE_CPU
)
{
if
(
asyncDrvr
->
skip_fine_grain_
!=
NULL
)
{
if
(
asyncDrvr
->
skip_
cpu_
fine_grain_
!=
NULL
)
{
if
(
is_fine_grained
==
true
)
{
return
HSA_STATUS_SUCCESS
;
}
...
...
@@ -119,9 +120,21 @@ hsa_status_t MemPoolInfo(hsa_amd_memory_pool_t pool, void* data) {
}
}
}
// hsa_device_type_t device_type;
// status = hsa_agent_get_info(agent, HSA_AGENT_INFO_DEVICE, &device_type);
// ErrorCheck(status);
// Consult user request and add either fine-grained or
// coarse-grained memory pools if agent is GPU. Default
// is to skip fine-grained memory pools
if
(
agent_info
.
device_type_
==
HSA_DEVICE_TYPE_GPU
)
{
if
(
asyncDrvr
->
skip_gpu_coarse_grain_
!=
NULL
)
{
if
(
is_fine_grained
==
false
)
{
return
HSA_STATUS_SUCCESS
;
}
}
else
{
if
(
is_fine_grained
==
true
)
{
return
HSA_STATUS_SUCCESS
;
}
}
}
// Create an instance of agent_pool_info and add it to the list
pool_info_t
pool_info
(
agent
,
asyncDrvr
->
agent_index_
,
pool
,
...
...
rocm_bandwidth_test_trans.cpp
View file @
389f67cc
...
...
@@ -130,7 +130,7 @@ bool RocmBandwidthTest::FilterCpuPool(uint32_t req_type,
// If env to skip fine grain is NULL it means
// we should filter out coarse-grain pools
if
(
skip_fine_grain_
==
NULL
)
{
if
(
skip_
cpu_
fine_grain_
==
NULL
)
{
return
(
fine_grained
==
false
);
}
...
...
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