From bee336d3607cec325902e3fdff18b87f2960e1f4 Mon Sep 17 00:00:00 2001 From: Satyanvesh Dittakavi Date: Fri, 11 Aug 2023 10:50:21 +0000 Subject: [PATCH] SWDEV-416443 - hipPointerGetAttributes should return correct type for managed memory Change-Id: Ic197cd8c9d3f5405616ed6e4924ed5577e636b94 [ROCm/clr commit: 84eae1f0a9a7af5e1b6bcf6eeb72e07e96ca86a3] --- projects/clr/hipamd/src/hip_memory.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/clr/hipamd/src/hip_memory.cpp b/projects/clr/hipamd/src/hip_memory.cpp index 7a08b3932a..3bee6c2721 100644 --- a/projects/clr/hipamd/src/hip_memory.cpp +++ b/projects/clr/hipamd/src/hip_memory.cpp @@ -3379,6 +3379,9 @@ hipError_t hipPointerGetAttributes(hipPointerAttribute_t* attributes, const void ((memObj->getMemFlags() & kManagedAlloc) == kManagedAlloc) ? true : false; attributes->allocationFlags = memObj->getUserData().flags; attributes->device = memObj->getUserData().deviceId; + if (attributes->isManaged) { + attributes->type = hipMemoryTypeManaged; + } HIP_RETURN(hipSuccess); }