Get the size of VGPR and SGPR register file
Signed-off-by: Mike Li <Tianxinmike.Li@amd.com> Change-Id: Ifa515ad7e1df1dd27f25f1e919b0053049531063
Tá an tiomantas seo le fáil i:
tiomanta ag
Mike (Tianxin) Li
tuismitheoir
5f0e39df63
tiomantas
344ed757e0
@@ -984,6 +984,12 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
|
||||
case HSA_AMD_AGENT_INFO_ASIC_REVISION:
|
||||
*((uint32_t*)value) = static_cast<uint32_t>(properties_.Capability.ui32.ASICRevision);
|
||||
break;
|
||||
case HSA_AMD_AGENT_INFO_VGPR_SIZE:
|
||||
*((uint32_t*)value) = properties_.VGPRSizePerCU;
|
||||
break;
|
||||
case HSA_AMD_AGENT_INFO_SGPR_SIZE:
|
||||
*((uint32_t*)value) = properties_.SGPRSizePerCU;
|
||||
break;
|
||||
default:
|
||||
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
|
||||
break;
|
||||
|
||||
@@ -291,7 +291,17 @@ typedef enum hsa_amd_agent_info_s {
|
||||
* selective workarounds for hardware errata.
|
||||
* The type of this attribute is uint32_t.
|
||||
*/
|
||||
HSA_AMD_AGENT_INFO_ASIC_REVISION = 0xA012
|
||||
HSA_AMD_AGENT_INFO_ASIC_REVISION = 0xA012,
|
||||
/**
|
||||
* Size of VGPR register file in kilobytes per CU.
|
||||
* The type of this attribute is uint32_t.
|
||||
*/
|
||||
HSA_AMD_AGENT_INFO_VGPR_SIZE = 0xA013,
|
||||
/**
|
||||
* Size of SGPR register file in kilobytes per CU.
|
||||
* The type of this attribute is uint32_t.
|
||||
*/
|
||||
HSA_AMD_AGENT_INFO_SGPR_SIZE = 0xA014
|
||||
} hsa_amd_agent_info_t;
|
||||
|
||||
typedef struct hsa_amd_hdp_flush_s {
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir