Add agent properties for Tools

Change-Id: I7bc49d35dc559f9c9058aae591b88c5ecc4b3ce5
Этот коммит содержится в:
Ramesh Errabolu
2017-01-16 13:09:33 -06:00
родитель f0263d8198
Коммит 8ab28d1a51
3 изменённых файлов: 34 добавлений и 1 удалений
+9
Просмотреть файл
@@ -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;
+9
Просмотреть файл
@@ -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;
+16 -1
Просмотреть файл
@@ -121,7 +121,22 @@ typedef enum hsa_amd_agent_info_s {
* Maximum number of waves possible in a Compute Unit.
* The type of this attribute is uint32_t.
*/
HSA_AMD_AGENT_INFO_MAX_WAVES_PER_CU = 0xA00A
HSA_AMD_AGENT_INFO_MAX_WAVES_PER_CU = 0xA00A,
/**
* Number of SIMD's per compute unit CU
* The type of this attribute is uint32_t.
*/
HSA_AMD_AGENT_INFO_NUM_SIMDS_PER_CU = 0xA00B,
/**
* Number of Shader Engines (SE) in Gpu
* The type of this attribute is uint32_t.
*/
HSA_AMD_AGENT_INFO_NUM_SHADER_ENGINES = 0xA00C,
/**
* Number of Shader Arrays Per Shader Engines in Gpu
* The type of this attribute is uint32_t.
*/
HSA_AMD_AGENT_INFO_NUM_SHADER_ARRAYS_PER_SE = 0xA00D
} hsa_amd_agent_info_t;
/**