Add agent properties for Tools
Change-Id: I7bc49d35dc559f9c9058aae591b88c5ecc4b3ce5
Этот коммит содержится в:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
Ссылка в новой задаче
Block a user