From 2b8634bada42afac35f867dfd7d7907bcf505cb4 Mon Sep 17 00:00:00 2001 From: kjayapra-amd Date: Thu, 22 Feb 2024 11:16:33 -0500 Subject: [PATCH] SWDEV-446298 - Adding error code to the logs on p2p hsa api failure. Change-Id: Ic41b1ad1b64cca0e31986337a83a5146d52a7328 --- rocclr/device/rocm/rocdevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rocclr/device/rocm/rocdevice.cpp b/rocclr/device/rocm/rocdevice.cpp index 4b451136da..d4fb779e4b 100644 --- a/rocclr/device/rocm/rocdevice.cpp +++ b/rocclr/device/rocm/rocdevice.cpp @@ -2275,7 +2275,7 @@ bool Device::deviceAllowAccess(void* ptr) const { hsa_status_t stat = hsa_amd_agents_allow_access(p2pAgents().size(), p2pAgents().data(), nullptr, ptr); if (stat != HSA_STATUS_SUCCESS) { - LogError("Allow p2p access failed - hsa_amd_agents_allow_access"); + LogPrintfError("Allow p2p access failed - hsa_amd_agents_allow_access with err %d", stat); return false; } } @@ -2291,7 +2291,7 @@ bool Device::allowPeerAccess(device::Memory* memory) const { hsa_agent_t agent = getBackendDevice(); hsa_status_t stat = hsa_amd_agents_allow_access(1, &agent, nullptr, ptr); if (stat != HSA_STATUS_SUCCESS) { - LogError("Allow p2p access failed - hsa_amd_agents_allow_access"); + LogPrintfError("Allow p2p access failed - hsa_amd_agents_allow_access with err: %d", stat); return false; } }