Add agent properties for Tools

Change-Id: I7bc49d35dc559f9c9058aae591b88c5ecc4b3ce5


[ROCm/ROCR-Runtime commit: 8ab28d1a51]
This commit is contained in:
Ramesh Errabolu
2017-01-16 13:09:33 -06:00
parent 03668e6e06
commit 99ec6c549b
3 changed files with 34 additions and 1 deletions
@@ -344,6 +344,15 @@ hsa_status_t CpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
*((uint32_t*)value) = static_cast<uint32_t>(
properties_.NumSIMDPerCU * properties_.MaxWavesPerSIMD);
break;
case HSA_AMD_AGENT_INFO_NUM_SIMDS_PER_CU:
*((uint32_t*)value) = properties_.NumSIMDPerCU;
break;
case HSA_AMD_AGENT_INFO_NUM_SHADER_ENGINES:
*((uint32_t*)value) = properties_.NumShaderBanks;
break;
case HSA_AMD_AGENT_INFO_NUM_SHADER_ARRAYS_PER_SE:
*((uint32_t*)value) = properties_.NumArrays;
break;
default:
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
break;
@@ -840,6 +840,15 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
*((uint32_t*)value) = static_cast<uint32_t>(
properties_.NumSIMDPerCU * properties_.MaxWavesPerSIMD);
break;
case HSA_AMD_AGENT_INFO_NUM_SIMDS_PER_CU:
*((uint32_t*)value) = properties_.NumSIMDPerCU;
break;
case HSA_AMD_AGENT_INFO_NUM_SHADER_ENGINES:
*((uint32_t*)value) = properties_.NumShaderBanks;
break;
case HSA_AMD_AGENT_INFO_NUM_SHADER_ARRAYS_PER_SE:
*((uint32_t*)value) = properties_.NumArrays;
break;
default:
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
break;