Add recommended granule query
Change-Id: I7eb10e267d0272759321ee30feddf2d6464d9443
[ROCm/rocminfo commit: f1f463d818]
Этот коммит содержится в:
@@ -151,6 +151,7 @@ typedef struct {
|
||||
size_t pool_size;
|
||||
bool alloc_allowed;
|
||||
size_t alloc_granule;
|
||||
size_t alloc_rec_granule;
|
||||
size_t pool_alloc_alignment;
|
||||
bool pl_access;
|
||||
uint32_t global_flag;
|
||||
@@ -705,6 +706,11 @@ static hsa_status_t AcquirePoolInfo(hsa_amd_memory_pool_t pool,
|
||||
&pool_i->alloc_granule);
|
||||
RET_IF_HSA_ERR(err);
|
||||
|
||||
err = hsa_amd_memory_pool_get_info(pool,
|
||||
HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_REC_GRANULE,
|
||||
&pool_i->alloc_rec_granule);
|
||||
RET_IF_HSA_ERR(err);
|
||||
|
||||
err = hsa_amd_memory_pool_get_info(pool,
|
||||
HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_ALIGNMENT,
|
||||
&pool_i->pool_alloc_alignment);
|
||||
@@ -790,6 +796,9 @@ static void DisplayPoolInfo(pool_info_t *pool_i, uint32_t indent) {
|
||||
std::string gr_str = std::to_string(pool_i->alloc_granule/1024)+"KB";
|
||||
printLabelStr("Alloc Granule:", gr_str.c_str(), indent);
|
||||
|
||||
std::string rgr_str = std::to_string(pool_i->alloc_rec_granule / 1024) + "KB";
|
||||
printLabelStr("Alloc Recommended Granule:", rgr_str.c_str(), indent);
|
||||
|
||||
std::string al_str = std::to_string(pool_i->pool_alloc_alignment/1024)+"KB";
|
||||
printLabelStr("Alloc Alignment:", al_str.c_str(), indent);
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user