From c2b9abaa1df1cda55a0bd74334bb89bb1ae94e2d Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Fri, 24 Jun 2022 23:06:22 -0500 Subject: [PATCH] Add missing query on CPU agents. Adds HSA_AMD_AGENT_INFO_SVM_DIRECT_HOST_ACCESS. Change-Id: I317d7b451ed2910cdf2290b196fd89e3bf0be435 --- runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp index 27499dea99..cdbd9e13d0 100644 --- a/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_cpu_agent.cpp @@ -359,6 +359,10 @@ hsa_status_t CpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const { case HSA_AMD_AGENT_INFO_ASIC_REVISION: *((uint32_t*)value) = static_cast(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) = true; + break; case HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY: return core::Runtime::runtime_singleton_->GetSystemInfo(HSA_SYSTEM_INFO_TIMESTAMP_FREQUENCY, value);