From 325f98d2297aa3a1189ddac84b2a8a45f1fa3686 Mon Sep 17 00:00:00 2001 From: Shweta Khatri Date: Tue, 24 Oct 2023 14:57:09 -0400 Subject: [PATCH] Updated the test to access PCIe domain info for the agent Change-Id: I901fd76f91315a0262945659d12349ba7b64ed11 [ROCm/ROCR-Runtime commit: 4890ffe224f1434f35d5731fce57106ac6cbbd28] --- .../rocrtst/suites/performance/memory_async_copy.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/rocr-runtime/rocrtst/suites/performance/memory_async_copy.cc b/projects/rocr-runtime/rocrtst/suites/performance/memory_async_copy.cc index 51b3a8b7aa..df72415ac2 100755 --- a/projects/rocr-runtime/rocrtst/suites/performance/memory_async_copy.cc +++ b/projects/rocr-runtime/rocrtst/suites/performance/memory_async_copy.cc @@ -674,9 +674,12 @@ static hsa_status_t GetGPUAgents(hsa_agent_t agent, void* data) { name2, bus, device, function, name); } + uint32_t pci_domain_id = 0; + err = hsa_agent_get_info(agent, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_DOMAIN, &pci_domain_id); + RET_IF_HSA_ERR(err); + hwloc_obj_t gpu_hwl_dev; - // Assume domain of 0 for now - gpu_hwl_dev = hwloc_get_pcidev_by_busid(ptr->topology(), 0, bus, device, + gpu_hwl_dev = hwloc_get_pcidev_by_busid(ptr->topology(), pci_domain_id, bus, device, function); if (gpu_hwl_dev == nullptr) {