Clearer/more concise variable names
Change-Id: Ib92211977066b728f19b2a7fe40639160a8262b3
[ROCm/ROCR-Runtime commit: ab2248132a]
Этот коммит содержится в:
@@ -293,7 +293,7 @@ hsa_status_t AcquirePoolInfo(hsa_amd_memory_pool_t pool,
|
||||
|
||||
// Get the size of the POOL
|
||||
err = hsa_amd_memory_pool_get_info(pool, HSA_AMD_MEMORY_POOL_INFO_SIZE,
|
||||
&pool_i->pool_size);
|
||||
&pool_i->size);
|
||||
RET_IF_HSA_COMMON_ERR(err);
|
||||
|
||||
err = hsa_amd_memory_pool_get_info(pool,
|
||||
@@ -308,12 +308,12 @@ hsa_status_t AcquirePoolInfo(hsa_amd_memory_pool_t pool,
|
||||
|
||||
err = hsa_amd_memory_pool_get_info(pool,
|
||||
HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_ALIGNMENT,
|
||||
&pool_i->pool_alloc_alignment);
|
||||
&pool_i->alloc_alignment);
|
||||
RET_IF_HSA_COMMON_ERR(err);
|
||||
|
||||
err = hsa_amd_memory_pool_get_info(pool,
|
||||
HSA_AMD_MEMORY_POOL_INFO_ACCESSIBLE_BY_ALL,
|
||||
&pool_i->pl_access);
|
||||
&pool_i->accessible_by_all);
|
||||
RET_IF_HSA_COMMON_ERR(err);
|
||||
|
||||
return HSA_STATUS_SUCCESS;
|
||||
@@ -325,7 +325,7 @@ hsa_status_t DumpMemoryPoolInfo(const pool_info_t *pool_i,
|
||||
|
||||
DumpSegment(pool_i, &ind_lvl);
|
||||
|
||||
std::string sz_str = std::to_string(pool_i->pool_size / 1024) + "KB";
|
||||
std::string sz_str = std::to_string(pool_i->size / 1024) + "KB";
|
||||
fprintf(stdout, "%s%-25s%-35s\n", ind_lvl.c_str(), "Pool Size:",
|
||||
sz_str.c_str());
|
||||
|
||||
@@ -338,12 +338,12 @@ hsa_status_t DumpMemoryPoolInfo(const pool_info_t *pool_i,
|
||||
|
||||
|
||||
std::string al_str =
|
||||
std::to_string(pool_i->pool_alloc_alignment / 1024) + "KB";
|
||||
std::to_string(pool_i->alloc_alignment / 1024) + "KB";
|
||||
fprintf(stdout, "%s%-25s%-35s\n", ind_lvl.c_str(), "Pool Alloc Alignment:",
|
||||
al_str.c_str());
|
||||
|
||||
fprintf(stdout, "%s%-25s%-35s\n", ind_lvl.c_str(), "Pool Acessible by all:",
|
||||
(pool_i->pl_access ? "TRUE" : "FALSE"));
|
||||
(pool_i->accessible_by_all ? "TRUE" : "FALSE"));
|
||||
|
||||
return HSA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -82,11 +82,11 @@ namespace rocrtst {
|
||||
// information.
|
||||
typedef struct {
|
||||
uint32_t segment;
|
||||
size_t pool_size;
|
||||
size_t size;
|
||||
bool alloc_allowed;
|
||||
size_t alloc_granule;
|
||||
size_t pool_alloc_alignment;
|
||||
bool pl_access;
|
||||
size_t alloc_alignment;
|
||||
bool accessible_by_all;
|
||||
uint32_t global_flag;
|
||||
} pool_info_t;
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ void MemoryTest::MaxSingleAllocationTest(hsa_agent_t ag,
|
||||
}
|
||||
|
||||
if (!pool_i.alloc_allowed || pool_i.alloc_granule == 0 ||
|
||||
pool_i.pool_alloc_alignment == 0) {
|
||||
pool_i.alloc_alignment == 0) {
|
||||
if (verbosity() > 0) {
|
||||
std::cout << " Test not applicable. Skipping." << std::endl;
|
||||
std::cout << kSubTestSeparator << std::endl;
|
||||
@@ -197,7 +197,7 @@ void MemoryTest::MaxSingleAllocationTest(hsa_agent_t ag,
|
||||
}
|
||||
// Do everything in "granule" units
|
||||
auto gran_sz = pool_i.alloc_granule;
|
||||
auto pool_sz = pool_i.pool_size / gran_sz;
|
||||
auto pool_sz = pool_i.size / gran_sz;
|
||||
|
||||
// Neg. test: Try to allocate more than the pool size
|
||||
err = TestAllocate(pool, pool_sz*gran_sz + gran_sz);
|
||||
|
||||
Ссылка в новой задаче
Block a user