Report PCIe domain number.

Adds HSA_AMD_AGENT_INFO_DOMAIN.

Change-Id: I2ffcae474e18b2fe5f962b499e02eb9dfe2e62cd


[ROCm/ROCR-Runtime commit: f343f6706e]
This commit is contained in:
Sean Keely
2019-08-21 16:52:26 -05:00
parent 61b9d4e8b2
commit 5df1a8ae77
3 changed files with 13 additions and 1 deletions
@@ -356,6 +356,9 @@ hsa_status_t CpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
case HSA_AMD_AGENT_INFO_HDP_FLUSH:
*((hsa_amd_hdp_flush_t*)value) = {nullptr, nullptr};
break;
case HSA_AMD_AGENT_INFO_DOMAIN:
*((uint32_t*)value) = static_cast<uint32_t>(properties_.Domain);
break;
default:
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
break;
@@ -906,6 +906,9 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
case HSA_AMD_AGENT_INFO_HDP_FLUSH:
*((hsa_amd_hdp_flush_t*)value) = HDP_flush_;
break;
case HSA_AMD_AGENT_INFO_DOMAIN:
*((uint32_t*)value) = static_cast<uint32_t>(properties_.Domain);
break;
default:
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
break;
@@ -152,7 +152,13 @@ typedef enum hsa_amd_agent_info_s {
* model and should be treated with caution.
* The type of this attribute is hsa_amd_hdp_flush_t.
*/
HSA_AMD_AGENT_INFO_HDP_FLUSH = 0xA00E
HSA_AMD_AGENT_INFO_HDP_FLUSH = 0xA00E,
/**
* PCIe domain for the agent. Pairs with HSA_AMD_AGENT_INFO_BDFID
* to give the full physical location of the Agent.
* The type of this attribute is uint32_t.
*/
HSA_AMD_AGENT_INFO_DOMAIN = 0xA00F
} hsa_amd_agent_info_t;
typedef struct hsa_amd_hdp_flush_s {