diff --git a/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp index c1076e4800..05ec15d035 100755 --- a/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp @@ -344,6 +344,15 @@ hsa_status_t CpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const { *((uint32_t*)value) = static_cast( 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; diff --git a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp index 9fcf50bf73..7c98e63372 100755 --- a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -840,6 +840,15 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const { *((uint32_t*)value) = static_cast( 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; diff --git a/runtime/hsa-runtime/inc/hsa_ext_amd.h b/runtime/hsa-runtime/inc/hsa_ext_amd.h index a273e41acc..d835d7d014 100755 --- a/runtime/hsa-runtime/inc/hsa_ext_amd.h +++ b/runtime/hsa-runtime/inc/hsa_ext_amd.h @@ -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; /**