SWDEV-558080 - Add recommended granularity (#1176)
* Add recommended granularity * Improve granularity testing * Update based on feedback
This commit is contained in:
@@ -792,13 +792,22 @@ hsa_status_t Device::iterateGpuMemoryPoolCallback(hsa_amd_memory_pool_t pool, vo
|
||||
|
||||
// Query the recommended granularity for this pool.
|
||||
stat = Hsa::memory_pool_get_info(pool, HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_GRANULE,
|
||||
&(dev->info_.virtualMemAllocGranularity_));
|
||||
&(dev->info_.virtualMemAllocGranularityMinimum_));
|
||||
if (stat != HSA_STATUS_SUCCESS) {
|
||||
LogPrintfError(
|
||||
"Cannot query HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_GRANULE info"
|
||||
"failed with hsa_status: %d \n",
|
||||
stat);
|
||||
}
|
||||
// Query the recommended granularity for this pool.
|
||||
stat = Hsa::memory_pool_get_info(pool, HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_REC_GRANULE,
|
||||
&(dev->info_.virtualMemAllocGranularityRecommended_));
|
||||
if (stat != HSA_STATUS_SUCCESS) {
|
||||
LogPrintfError(
|
||||
"Cannot query HSA_AMD_MEMORY_POOL_INFO_RUNTIME_ALLOC_REC_GRANULE info"
|
||||
"failed with hsa_status: %d \n",
|
||||
stat);
|
||||
}
|
||||
}
|
||||
|
||||
if (dev->gpuvm_segment_.handle == 0) {
|
||||
|
||||
Reference in New Issue
Block a user