Add ROCr queries for HMM support

Change-Id: I2b5508bf0faf8f48dd7348d6a5202fb28de09876
这个提交包含在:
German Andryeyev
2020-10-09 18:22:59 -04:00
父节点 2a5f1ccadf
当前提交 c05de4f2f9
共修改 2 个文件,包含 20 行新增和 1 行删除
+16 -1
查看文件
@@ -1418,7 +1418,7 @@ bool Device::populateOCLDeviceConstants() {
return false;
}
uint32_t asic_revision;
uint32_t asic_revision = 0;
if (HSA_STATUS_SUCCESS !=
hsa_agent_get_info(_bkendDevice,
static_cast<hsa_agent_info_t>(HSA_AMD_AGENT_INFO_ASIC_REVISION),
@@ -1470,6 +1470,21 @@ bool Device::populateOCLDeviceConstants() {
? (atoi(sgprValue.c_str()))
: 0;
}
#if AMD_HMM_SUPPORT
// Generic support for HMM interfaces
if (HSA_STATUS_SUCCESS != hsa_system_get_info(HSA_AMD_SYSTEM_INFO_SVM_SUPPORTED,
&info_.hmmSupported_)) {
LogError("HSA_AMD_SYSTEM_INFO_SVM_SUPPORTED query failed. HMM will be disabled");
}
// This capability should be available with xnack enabled
if (HSA_STATUS_SUCCESS != hsa_system_get_info(HSA_AMD_SYSTEM_INFO_SVM_ACCESSIBLE_BY_DEFAULT,
&info_.hmmCpuMemoryAccessible_)) {
LogError("HSA_AMD_SYSTEM_INFO_SVM_ACCESSIBLE_BY_DEFAULT query failed.");
}
#endif // AMD_HMM_SUPPORT
return true;
}