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]
This commit is contained in:
Sean Keely
2021-06-01 23:51:29 -05:00
orang tua 0100fa968c
melakukan b8533eec6d
2 mengubah file dengan 10 tambahan dan 1 penghapusan
@@ -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;