diff --git a/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp old mode 100644 new mode 100755 index 7784b0f21e..c1076e4800 --- a/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp @@ -340,6 +340,10 @@ hsa_status_t CpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const { case HSA_AMD_AGENT_INFO_BDFID: *((uint32_t*)value) = static_cast(properties_.LocationId); break; + case HSA_AMD_AGENT_INFO_MAX_WAVES_PER_CU: + *((uint32_t*)value) = static_cast( + properties_.NumSIMDPerCU * properties_.MaxWavesPerSIMD); + 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 old mode 100644 new mode 100755 index 3c69e6497e..e698099d18 --- a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -836,6 +836,10 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const { } break; } + case HSA_AMD_AGENT_INFO_MAX_WAVES_PER_CU: + *((uint32_t*)value) = static_cast( + properties_.NumSIMDPerCU * properties_.MaxWavesPerSIMD); + 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 old mode 100644 new mode 100755 index fb9491333b..ab7757389b --- a/runtime/hsa-runtime/inc/hsa_ext_amd.h +++ b/runtime/hsa-runtime/inc/hsa_ext_amd.h @@ -116,7 +116,12 @@ typedef enum hsa_amd_agent_info_s { * Board name of Agent - populated from MarketingName of Kfd Node * The value is an Ascii string of 64 chars. */ - HSA_AMD_AGENT_INFO_PRODUCT_NAME = 0xA009 + HSA_AMD_AGENT_INFO_PRODUCT_NAME = 0xA009, + /** + * 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_t; /**