Report HMM driver support status.

Implements HSA_AMD_SYSTEM_INFO_SVM_SUPPORTED.

Change-Id: If5182edcc1fa067fa514aa2c1bd326c4c42d1b64
This commit is contained in:
Sean Keely
2021-04-21 21:44:42 -05:00
parent 77046a1aaa
commit ee8b1b64ad
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -645,8 +645,12 @@ hsa_status_t Runtime::GetSystemInfo(hsa_system_info_t attribute, void* value) {
break;
}
case HSA_AMD_SYSTEM_INFO_SVM_SUPPORTED: {
// todo: Get HMM kernel support info.
*(bool*)value = true;
bool ret = true;
for (auto agent : gpu_agents_) {
AMD::GpuAgent* gpu = (AMD::GpuAgent*)agent;
ret &= (gpu->properties().Capability.ui32.SVMAPISupported == 1);
}
*(bool*)value = ret;
break;
}
case HSA_AMD_SYSTEM_INFO_SVM_ACCESSIBLE_BY_DEFAULT: {