Add agent info query for HSA_AMD_AGENT_INFO_SVM_DIRECT_HOST_ACCESS.
Allows determining if the host can directly access HMM memory that
is physically resident in vram.
Change-Id: Ie452eedd0e27fe1b511afd416f5a1cd01b3d84e8
[ROCm/ROCR-Runtime commit: 9e53cab613]
Tá an tiomantas seo le fáil i:
@@ -982,6 +982,9 @@ 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_SVM_DIRECT_HOST_ACCESS:
|
||||
assert(regions_.size() != 0 && "No device local memory found!");
|
||||
*((bool*)value) = properties_.Capability.ui32.CoherentHostAccess == 1;
|
||||
default:
|
||||
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
|
||||
break;
|
||||
|
||||
@@ -291,7 +291,13 @@ 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,
|
||||
/**
|
||||
* Queries whether or not the host can directly access SVM memory that is
|
||||
* physically resident in the agent's local memory.
|
||||
* The type of this attribute is bool.
|
||||
*/
|
||||
HSA_AMD_AGENT_INFO_SVM_DIRECT_HOST_ACCESS = 0xA013
|
||||
} hsa_amd_agent_info_t;
|
||||
|
||||
typedef struct hsa_amd_hdp_flush_s {
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir