From e495a4b16aba5b4d09e49bab7aa01f5fda083bb9 Mon Sep 17 00:00:00 2001 From: Mike Li Date: Thu, 9 Jun 2022 12:58:57 -0400 Subject: [PATCH] Do not use the function part of the location_id The function IDs used to be 0 on previous asics but on gfx94x and newer asics, these bits are set. These bits are used by user applications to uniquely identify the locations of GPU nodes. These exta bits break hwloc and are not needed for rocrtst. Signed-off-by: Mike Li Signed-off-by: David Yat Sin Change-Id: I1202f504645b0662d009b9c0926eebb7ddc08d73 [ROCm/ROCR-Runtime commit: d7fa6543383d2574a690d0f1b90240301a6f8196] --- .../rocrtst/suites/performance/memory_async_copy.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 a9e7d6d7d2..51b3a8b7aa 100755 --- a/projects/rocr-runtime/rocrtst/suites/performance/memory_async_copy.cc +++ b/projects/rocr-runtime/rocrtst/suites/performance/memory_async_copy.cc @@ -657,7 +657,10 @@ static hsa_status_t GetGPUAgents(hsa_agent_t agent, void* data) { uint8_t bus = (agent_bdf_id & (0xFF << 8)) >> 8; uint8_t device = (agent_bdf_id & (0x1F << 3)) >> 3; - uint8_t function = (agent_bdf_id & 0x07); + + // The function part of the location_id hasn't been used yet + // and may not contain a valid function number. + uint8_t function = 0; //(agent_bdf_id & 0x07); if (ptr->verbosity() > MemoryAsyncCopy::VERBOSE_STANDARD) { char name[64];